forked from faassen/solid-dexie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
30 lines (29 loc) · 858 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
import path from "path";
import { defineConfig } from "vite";
import solidPlugin from "vite-plugin-solid";
import typescript from "@rollup/plugin-typescript";
export default defineConfig({
plugins: [solidPlugin()],
build: {
target: "esnext",
polyfillDynamicImport: false,
lib: {
entry: path.resolve(__dirname, "src/solid-dexie.ts"),
name: "solid-dexie",
fileName: (format) => `solid-dexie.${format}.js`,
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["solid-js", "solid-js/store", "dexie"],
output: {
globals: {
"solid-js": "solidJS",
"solid-js/store": "solidJSStore",
dexie: "dexie",
},
},
plugins: [typescript({ tsconfig: "./tsconfig.build.json" })],
},
},
});