diff options
Diffstat (limited to 'src/packages/react/vite.config.ts')
-rw-r--r-- | src/packages/react/vite.config.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/packages/react/vite.config.ts b/src/packages/react/vite.config.ts new file mode 100644 index 0000000..d43457e --- /dev/null +++ b/src/packages/react/vite.config.ts @@ -0,0 +1,22 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react-swc"; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + build: { + lib: { + entry: "src/index.ts", + name: "Locusts", + fileName: "locusts", + }, + rollupOptions: { + external: ["react"], + output: { + globals: { + react: "React", + }, + }, + }, + }, +}); |