-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
64 lines (63 loc) · 1.51 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import path from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue2';
import ViteComponents from 'unplugin-vue-components/vite';
import eslint from 'vite-plugin-eslint';
import mkcert from 'vite-plugin-mkcert';
export default defineConfig({
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
},
build: {
outDir: 'www',
rollupOptions: {
output: {
manualChunks: {
firebase: [
'firebase/compat/app',
'firebase/compat/analytics',
'firebase/compat/auth',
'firebase/compat/database',
'firebase/compat/storage',
'firebase/compat/functions',
],
vuetify: ['vuetify', 'vuetify/lib'],
},
},
},
},
resolve: {
alias: {
'@': path.resolve(import.meta.dirname, 'src'),
'~vuetify': 'vuetify',
},
},
plugins: [
vue(),
ViteComponents({
resolvers: [
{
type: 'component',
resolve: (name) => {
const customVuetifyLikeComponents = [
'VFile',
];
if (!customVuetifyLikeComponents.includes(name) && name.match(/^V[A-Z]/)) {
return { name, from: 'vuetify/lib' };
}
return undefined;
},
},
],
version: 2.7,
}),
eslint({
cache: false, // it was getting stale and causing false positives
}),
mkcert(),
],
server: {
port: 3000,
host: true,
},
});