You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
723 B
27 lines
723 B
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "node:path";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
root: path.resolve(__dirname),
|
|
publicDir: false,
|
|
build: {
|
|
outDir: path.resolve(__dirname, "../app/web/dist"),
|
|
emptyOutDir: true,
|
|
assetsDir: "assets",
|
|
rollupOptions: {
|
|
input: path.resolve(__dirname, "index.html"),
|
|
output: {
|
|
entryFileNames: "assets/app.js",
|
|
chunkFileNames: "assets/[name].js",
|
|
assetFileNames: (assetInfo) => {
|
|
if (assetInfo.name?.endsWith(".css")) {
|
|
return "assets/app.css";
|
|
}
|
|
return "assets/[name][extname]";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|