diff --git a/index.html b/index.html index 3b75541..cf12395 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,10 @@ - React Cosmos Vite Renderer + React Cosmos
- + diff --git a/main.tsx b/main.tsx new file mode 100644 index 0000000..ba0c09e --- /dev/null +++ b/main.tsx @@ -0,0 +1 @@ +import "react-cosmos/client" diff --git a/package.json b/package.json index c0cb01c..d02abbc 100644 --- a/package.json +++ b/package.json @@ -15,23 +15,26 @@ "@react-hook/resize-observer": "^2.0.2", "@tscircuit/solver-utils": "^0.0.3", "@types/bun": "latest", + "@types/react": "^18", + "@types/react-dom": "^18", "@types/three": "^0.181.0", "biome": "^0.3.3", "bun-match-svg": "^0.0.14", "graphics-debug": "^0.0.70", "rbush": "^4.0.1", - "react": "^19.2.0", - "react-cosmos": "^7.0.0", - "react-cosmos-plugin-vite": "^7.0.0", - "react-dom": "^19.2.0", + "react": "18", + "react-cosmos": "^6.2.3", + "react-cosmos-plugin-vite": "^6.2.0", + "react-dom": "18", "three": "^0.181.1", - "tsup": "^8.5.1" + "tsup": "^8.5.1", + "vite": "^6.0.11", + "@vitejs/plugin-react": "^4" }, "peerDependencies": { "typescript": "^5" }, "dependencies": { - "D": "^1.0.0", - "vite": "^7.2.2" + "D": "^1.0.0" } } diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..16d719d --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vite" +import react from "@vitejs/plugin-react" + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +})