-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
32 lines (30 loc) · 939 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { fileURLToPath, URL } from "node:url";
export default defineConfig(({ mode }) => {
return {
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)), // Alias für "src"-Ordner
},
},
build: {
rollupOptions: {
input: {
'courseware-flow': 'src/courseware-flow.js',
},
output: {
entryFileNames: `[name].js`,
assetFileNames: (assetInfo) => {
if (assetInfo.name == 'style.css') return 'courseware-flow.css';
return assetInfo.name;
},
},
},
},
define: {
'process.env.NODE_ENV': `"${mode}"`
},
};
});