From 9c3cef2cda489501a177c34ebe47951321284463 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Fri, 1 Nov 2024 10:16:44 -0500 Subject: feat: Add React (#38) * feat: Add React Closes #35 Signed-off-by: Matt Strapp * lint Signed-off-by: Matt Strapp * docs Signed-off-by: Matt Strapp * lint Signed-off-by: Matt Strapp * add keywords Signed-off-by: Matt Strapp --------- Signed-off-by: Matt Strapp --- src/packages/react/vite.config.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/packages/react/vite.config.ts (limited to 'src/packages/react/vite.config.ts') 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", + }, + }, + }, + }, +}); -- cgit v1.2.3