Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSC: Support CJS 'use client' modules #10682

Merged
merged 7 commits into from
May 24, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented May 24, 2024

Our module parsing was only written to handle ES Modules, and that's enough for anything in a user's project. But for things imported from node_modules, including our own framework packages, that might have already been transpiled to CJS that was not enough.

We need to support both parsing those modules, and then also importing them with our webpack shims. default behaves differently for CJS modules compared to ESM

@Tobbe Tobbe added release:fix This PR is a fix changesets-ok Override the changesets check labels May 24, 2024
@Tobbe Tobbe added this to the RSC milestone May 24, 2024
@Tobbe Tobbe enabled auto-merge (squash) May 24, 2024 09:01
@Tobbe Tobbe merged commit e38001b into redwoodjs:main May 24, 2024
46 checks passed
@Tobbe Tobbe deleted the tobbe-rsc-cjs-client-modules branch May 24, 2024 11:01
@Josh-Walker-GM Josh-Walker-GM modified the milestones: RSC, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets-ok Override the changesets check release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants