-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
85 lines (84 loc) · 2.08 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { resolve } from 'node:path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import Components from 'unplugin-vue-components/vite'
import eslintPlugin from 'vite-plugin-eslint'
import vueJsx from '@vitejs/plugin-vue-jsx'
export default defineConfig({
server: {
port: 8000,
host: true,
},
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.sass'],
},
plugins: [
vue(),
vueJsx(),
eslintPlugin({ cache: false }),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.svg', 'safari-pinned-tab.svg'],
manifest: {
name: 'Vue3 Starter',
short_name: 'V3S',
theme_color: '#4DBA87',
icons: [
{
src: './img/icons/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: './img/icons/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: './img/icons/android-chrome-maskable-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'maskable',
},
{
src: './img/icons/android-chrome-maskable-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
start_url: '.',
display: 'standalone',
background_color: '#000000',
},
}),
Components({
dts: false,
types: [{
from: 'vue-router',
names: ['RouterLink', 'RouterView'],
}],
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
}),
],
test: {
include: ['**/src/**/*.spec.[jt]s?(x)'],
environment: 'jsdom',
deps: {
inline: ['@vue', '@vueuse', 'vue-demi'],
},
},
css: {
preprocessorOptions: {
sass: {
additionalData: `
@import "@/styles/styles.sass"
`,
},
},
},
})