-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
41 lines (41 loc) · 1 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
import { defineConfig } from 'vite';
import Icons from 'unplugin-icons/vite';
import legacy from '@vitejs/plugin-legacy';
import WindiCSS from 'vite-plugin-windicss';
import createSvgSpritePlugin from 'vite-plugin-svg-sprite';
import path from 'path';
import { minifyHtml, injectHtml } from 'vite-plugin-html';
import pkg from './package.json';
import { VitePWA } from 'vite-plugin-pwa';
import { svelte } from '@sveltejs/vite-plugin-svelte';
export default defineConfig({
// root: './src/'
publicDir: 'assets',
plugins: [
createSvgSpritePlugin({}),
svelte(),
Icons({
compiler: 'svelte',
}),
minifyHtml(),
injectHtml({
data: {
version: pkg.version,
bugs: `${pkg.bugs}/new`,
author: pkg.author.name || pkg.author,
license: pkg.license,
},
}),
WindiCSS(),
legacy({
targets: ['defaults', 'not IE 11'],
}),
VitePWA(),
],
build: {
outDir: path.join(__dirname, 'website'),
},
server: {
open: true,
},
});