Skip to content

Commit

Permalink
fix: remove react-dom and jsx from production bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
edodusi committed Dec 11, 2024
1 parent 38f139e commit 4f6d319
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 167 deletions.
2 changes: 1 addition & 1 deletion playground/next15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@storyblok/react": "latest",
"@storyblok/react": "workspace:^",
"next": "15.0.4",
"react": "19.0.0",
"react-dom": "19.0.0"
Expand Down
167 changes: 2 additions & 165 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineConfig({
},
},
rollupOptions: {
external: ['react', 'next/cache'],
external: ['react', 'react/jsx-runtime', 'react-dom', 'react-dom/client', 'next/cache'],
output: {
preserveModules: true,
globals: { react: 'React' },
Expand Down

0 comments on commit 4f6d319

Please sign in to comment.