-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.ts
42 lines (41 loc) · 1.14 KB
/
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve, dirname } from 'path'
import { fileURLToPath } from 'url'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { VitePWA } from 'vite-plugin-pwa'
import { packages } from './package-lock.json'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
// i am ignoring my custom '<container>' tag
isCustomElement: (tag) => tag.startsWith('steelseries'),
},
},
}),
VueI18nPlugin({
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/i18n/locales/**'),
}),
VitePWA({
registerType: 'autoUpdate',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
},
devOptions: {
enabled: true,
},
}),
],
define: {
'process.env': {},
__VITE_VERSION__: JSON.stringify(packages['node_modules/vite'].version),
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
server: {
host: '0.0.0.0',
hmr: { host: 'localhost', overlay: false },
},
})