-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (26 loc) · 718 Bytes
/
vite.config.ts
File metadata and controls
27 lines (26 loc) · 718 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
import { defineConfig } from "vite"
import preact from "@preact/preset-vite"
import { viteSingleFile } from "vite-plugin-singlefile"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
preact(),
// JS and CSS in source HTML are not served with the right MIME type by GAS,
// so we inline them all in a single file
viteSingleFile(),
],
build: {
minify: true,
outDir: "../dist/sidebar",
rollupOptions: {
// see https://github.com/TanStack/query/issues/5175#issuecomment-1482196558
onwarn(warning, warn) {
if (warning.code === "MODULE_LEVEL_DIRECTIVE") {
return
}
warn(warning)
},
},
},
root: "sidebar",
})