generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
46 lines (43 loc) · 1.07 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
import path from 'node:path'
import { defineConfig } from 'vite'
import inspect from 'vite-plugin-inspect'
import tsconfigPaths from 'vite-tsconfig-paths'
import react from '@vitejs/plugin-react'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
// @ts-ignore
import svgSprite from '../src/vite'
export default defineConfig({
plugins: [
inspect(),
tsconfigPaths(),
react(),
svgSprite({
// debug: true,
content: ['src/assets/**/*.svg'],
sprites: {
symbol: {
runtime: {
// resourceQuery: true,
itemGenerator: path.join(
__dirname,
'scripts',
'sprites',
'symbol',
'item-generator.mjs',
),
spriteGenerator: path.join(
__dirname,
'scripts',
'sprites',
'symbol',
'sprite-generator.mjs',
),
},
},
stack: {
example: true,
},
},
}),
],
})