Skip to content

Conversation

@caio-pizzol
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Nov 26, 2025

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 5 to +7
export default defineConfig({
plugins: [react()],
base: '/',
resolve: {
alias: {
'superdoc/dist/style.css': path.resolve(__dirname, '../node_modules/superdoc/dist/style.css')
},
dedupe: ['react', 'react-dom', 'react/jsx-runtime']
}
base: '/'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore React dedupe in demo Vite config

Removing resolve.dedupe from the demo config means the demo now loads two React instances: the app uses demo/node_modules/react while the locally linked @superdoc-dev/template-builder (demo/package.json link:../.) resolves react from the repo root’s devDependencies. When the demo runs (pnpm dev or pnpm build inside demo), React will detect the double copy and throw the “Invalid hook call” error as soon as hooks render. Keeping resolve.dedupe for react, react-dom, and react/jsx-runtime avoids the duplicate runtime that the previous version prevented.

Useful? React with 👍 / 👎.

@caio-pizzol caio-pizzol merged commit 830b009 into main Nov 27, 2025
1 check passed
@caio-pizzol caio-pizzol deleted the caio/sd-1028-dedupe-not-needed branch November 27, 2025 15:03
superdoc-bot bot pushed a commit that referenced this pull request Dec 11, 2025
# [0.4.0](v0.3.0...v0.4.0) (2025-12-11)

### Bug Fixes

* disable comments module + sd update ([#22](#22)) ([79d24c7](79d24c7))
* remove dedupe + add dev react runtime ([#20](#20)) ([830b009](830b009))

### Features

* onexport callback ([#21](#21)) ([c85abc1](c85abc1))
@superdoc-bot
Copy link

superdoc-bot bot commented Dec 11, 2025

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants