-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
24 lines (23 loc) · 771 Bytes
/
vite.config.js
File metadata and controls
24 lines (23 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// vite.config.js
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
base:"/corruskivi/",
build: {
sourcemap: true,
rollupOptions: {
output: {
dir: "dist/corruskivi",
assetFileNames: (assetInfo) => {
let extType = assetInfo.name.split(".").at(1);
if (/png|jpe?g|svg|gif|tiff|bmp|ico/i.test(extType)) {
extType = "img";
}
return `assets/${extType}/[name]-[hash][extname]`;
},
chunkFileNames: "assets/js/[name]-[hash].js",
entryFileNames: "assets/js/[name]-[hash].js",
},
},
},
});