-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
34 lines (32 loc) · 990 Bytes
/
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
import dsv from "@rollup/plugin-dsv";
import autoprefixer from "autoprefixer";
import postCSSNesting from "postcss-nesting";
import tailwindcss from "tailwindcss";
import tailwindcssNesting from "tailwindcss/nesting";
import { ViteImageOptimizer } from "vite-plugin-image-optimizer";
import { ViteMinifyPlugin } from "vite-plugin-minify";
import type { UserConfig } from "vite";
export default {
plugins: [dsv(), ViteMinifyPlugin(), ViteImageOptimizer()],
css: {
postcss: {
plugins: [tailwindcssNesting(postCSSNesting()), tailwindcss(), autoprefixer()],
},
},
build: {
target: "ES2017",
rollupOptions: {
input: {
index: "./index.html",
converter: "./converter.html",
},
output: {
assetFileNames: "[name].[hash].[ext]",
chunkFileNames: "[name].[hash].js",
entryFileNames: "[name].[hash].js",
hashCharacters: "hex",
},
external: ["to-jyutping"],
},
},
} satisfies UserConfig;