-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.mts
50 lines (46 loc) · 1.27 KB
/
vite.config.mts
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 path from 'path'
import { PluginOption, defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueI18n from '@intlify/unplugin-vue-i18n/vite'
import { visualizer } from 'rollup-plugin-visualizer'
import sitemap from 'vite-plugin-sitemap'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vueI18n({
fullInstall: false, // do not install components and directives
include: path.resolve(__dirname, './src/locales/**'),
}),
sitemap({
hostname: 'https://example.com',
exclude: [
'/stats', // exclude visualizer stats
],
}),
visualizer({
filename: './dist/stats.html',
template: 'treemap', // treemap, sunburst, network
}) as PluginOption,
],
resolve: {
alias: [
{ find: '@', replacement: '/src' },
{ find: '@@', replacement: '/' },
{
find: 'vue-i18n',
replacement: 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js',
},
],
},
server: {
port: 3000, // default is 5173 (site)
strictPort: true, // throw an error instead of auto-advancing port
},
test: {
environment: 'jsdom',
// remove or set to 'default' to only show failing tests
reporters: 'verbose',
},
})