-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
41 lines (35 loc) · 1.03 KB
/
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
32
33
34
35
36
37
38
39
40
41
const { resolve } = require('path');
import vue from '@vitejs/plugin-vue';
import Icons from 'unplugin-icons/vite';
export default ({ command }) => {
const env = 'app';
const paths = {
app: resolve(__dirname, 'resources/js/app.js'),
};
return {
publicDir: 'public',
build: {
outDir: resolve(__dirname, 'public/dist/'),
emptyOutDir: false,
sourcemap: false,
manifest: false,
rollupOptions: {
output: {
assetFileNames: 'assets/[name].[ext]',
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
manualChunks(id) {
return env;
},
},
input: env ? { [env]: paths[env] } : paths,
},
},
plugins: [vue(), Icons()],
resolve: {
alias: {
'@': resolve('./resources/js'),
},
},
};
};