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
745 B

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "node:path";
export default defineConfig({
plugins: [vue()],
root: path.resolve(__dirname),
publicDir: path.resolve(__dirname, "public"),
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]";
},
},
},
},
});