-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
45 lines (43 loc) · 1009 Bytes
/
vite.config.ts
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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueDevTools from 'vite-plugin-vue-devtools';
import autoprefixer from 'autoprefixer';
import tailwind from 'tailwindcss';
import path, { dirname, resolve } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
css: {
postcss: {
plugins: [
tailwind(),
autoprefixer(),
],
},
},
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@public': path.resolve(__dirname, './public') // Add this line
}
},
build: {
sourcemap: false,
minify: 'esbuild',
chunkSizeWarningLimit: 1600,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules')) {
return 'vendor';
}
},
},
},
target: 'esnext', // Ensure ESNext support.
},
});