-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvite.config.js
50 lines (49 loc) · 1.45 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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue';
import vuetify, {transformAssetUrls} from 'vite-plugin-vuetify';
import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'url'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { includedRoutes } from './src/includedRoutes.js';
import legacy from '@vitejs/plugin-legacy'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: { transformAssetUrls }
}),
vuetify({ autoImport: true, styles: { configFile: 'src/scss/vuetify-settings.scss'} }),
VueI18nPlugin({
include: [resolve(dirname(fileURLToPath(import.meta.url)), './src/locales/*.json'),resolve(dirname(fileURLToPath(import.meta.url)), './data/locales/*.json')]
}),
legacy(),
// Currently not using Vite PWA because it introduces compatibility errors with IE.
],
ssr: {
noExternal: ['vuetify', /vue-i18n/],
},
ssgOptions: {
concurrency: 10,
crittersOptions: false,
script: 'async defer',
formatting: 'minify',
includedRoutes,
},
resolve: {
alias: {
"@": resolve(dirname(fileURLToPath(import.meta.url)), "./src"),
},
},
modulePreload: {
// See https://github.com/vitejs/vite/issues/5532 -- with this set to true, FF and Safari
// load chunks twice.
polyfill: false
},
server: {
port: 3000,
},
test: {
environment: 'jsdom'
},
});