33 lines
739 B
TypeScript
33 lines
739 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
],
|
|
root: path.resolve(__dirname),
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "src"),
|
|
"@shared": path.resolve(__dirname, "../shared"),
|
|
"@assets": path.resolve(__dirname, "../attached_assets"),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
emptyOutDir: true,
|
|
assetsDir: "assets",
|
|
rollupOptions: {
|
|
output: {
|
|
assetFileNames: "assets/[name]-[hash][extname]",
|
|
chunkFileNames: "assets/[name]-[hash].js",
|
|
entryFileNames: "assets/[name]-[hash].js",
|
|
},
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
force: true,
|
|
},
|
|
});
|