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

add back CJS<>CJS compatability from an earlier pr #2934

Merged
merged 1 commit into from Mar 20, 2021

Conversation

FredKSchott
Copy link
Owner

Changes

  • We thought that this may not be needed, so it had been removed before merging Simplify. cleanup, enhance snowpack internals #2707
  • However, we've found a case where this is required: A CJS package exports its entire namespace as a function AND attaches properties to that function. This is something that is really hard to represent in ESM, since the module.export result is both the default function and the namespace itself.
  • Add back support with a basic check for CJS<>CJS package imports to always use the default import.

Testing

  • N/A (we should add a test for React v16.14, but I want to get this out first so that its not broken overnight)

Docs

  • N/A

@vercel
Copy link

vercel bot commented Mar 20, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/4gmcxYHgDsXXGwbxheGp1KaDc5sM
✅ Preview: https://snowpack-git-add-back-cjs-cjs-compat-pikapkg.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant