-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
33 lines (32 loc) · 953 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
import pkg from "./package.json";
import { resolve } from "path";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
// https://vitejs.dev/guide/build.html#library-mode
// https://dev.to/shashannkbawa/deploying-vite-app-to-github-pages-3ane
export default defineConfig({
base: "/pixi-easing-graph/",
build: {
lib: {
entry: resolve(__dirname, "src/index.ts"),
name: pkg.name,
fileName: pkg.name,
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["react", "react-dom", "pixi.js", "@inlet/react-pixi"],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
react: "React",
"react-dom": "ReactDom",
"pixi.js": "PIXI",
"@inlet/react-pixi": "ReactPixi",
},
},
},
},
plugins: [dts()],
});