-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathvite.config.js
More file actions
40 lines (39 loc) · 857 Bytes
/
vite.config.js
File metadata and controls
40 lines (39 loc) · 857 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue2';
import { resolve } from 'path';
import tailwindcss from '@tailwindcss/vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills';
export default defineConfig({
plugins: [vue(), tailwindcss(), nodePolyfills()],
base: '/',
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
server: {
port: 8080,
},
build: {
outDir: 'dist',
assetsDir: 'assets',
commonjsOptions: {
include: [/node_modules/],
},
rollupOptions: {
output: {
manualChunks: {
vendor: ['vue', 'vue-i18n'],
three: ['three', 'three-csg-ts'],
qrcode: ['qrcode'],
},
},
},
},
worker: {
format: 'es',
},
optimizeDeps: {
include: ['vue', 'vue-i18n', 'three', 'qrcode'],
},
});