-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
30 lines (29 loc) · 877 Bytes
/
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
const { resolve } = require('path')
import htmlPurge from 'vite-plugin-html-purgecss'
import htmlImages from './vite-plugin-html-images/dist/index.js'
import { createHtmlPlugin } from 'vite-plugin-html'
export default {
root: "src",
plugins: [
htmlPurge({
content: ["**/*.html", "**/*.js"]
}),
htmlImages({
tempDirname: '.tempimages',
jpeg: {quality: 20, mozjpeg: true}
}),
createHtmlPlugin({
minify: true,
}),
],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'src/index.html'),
thanks: resolve(__dirname, 'src/thanks.html'),
more_elements: resolve(__dirname, 'src/more-elements.html'),
not_found: resolve(__dirname, 'src/404.html'),
}
}
},
}