-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
33 lines (32 loc) · 764 Bytes
/
vite.config.ts
File metadata and controls
33 lines (32 loc) · 764 Bytes
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
import { defineConfig } from "vite";
import preact from "@preact/preset-vite";
import basicSsl from "@vitejs/plugin-basic-ssl";
import legacy from "@vitejs/plugin-legacy";
import topLevelAwait from "vite-plugin-top-level-await";
import { createHtmlPlugin } from "vite-plugin-html";
// https://vitejs.dev/config/
export default defineConfig({
build: {
cssMinify: true,
},
plugins: [
basicSsl(),
createHtmlPlugin({
inject: {
data: {
HEAD_INSERT: process.env["HEAD_INSERT"],
},
},
}),
topLevelAwait(),
legacy({
targets: ["IE 11", "firefox 40"],
}),
preact({
prefreshEnabled: false,
}),
],
define: {
__BUILD_TIME__: JSON.stringify(new Date().toUTCString()),
},
});