-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
53 lines (49 loc) · 1.23 KB
/
vite.config.ts
File metadata and controls
53 lines (49 loc) · 1.23 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';
// import { Plugin } from 'vite';
// function customIconPathPlugin(): Plugin {
// /*
// this will fix the issue with vite rollup not finding the iconscout icons
// see https://github.com/Iconscout/vue-unicons/issues/24
// */
// return {
// name: 'custom-icon-path-plugin',
// resolveId(source) {
// if (source.startsWith('./icons/')) {
// const filePath = path.resolve(__dirname, 'node_modules/@iconscout/vue-unicons', source)+".vue";
// // console.log("modified "+filePath)
// return filePath;
// }
// // else {
// // console.log(`skipped `+source)
// // }
// },
// };
// }
// https://vitejs.dev/config/
export default defineConfig({
// optimizeDeps: {
// include: [ 'vue-command' ]
// },
plugins: [vue()],
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('three')) {
return 'three-vendor';
}
if (id.includes('vue-web-terminal')) {
return 'terminal-vendor';
}
}
}
}
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
},
}
})