Skip to content

Conversation

@CompuIves
Copy link
Member

@CompuIves CompuIves commented Jan 15, 2025

After preferring esmodules in our export resolving, some sandboxes broke because of its reliance on [email protected]. This version of chevrotain has a version of ESM where __esModule is set to true, but where also a default export is set. This should not happen, if __esModule is set to true, all of its exports should be on the root.

Other bundlers also had issue with this, and as a result some libraries have updated chevrotain to v11, which fixes the issue. We want to keep backwards compatibility on our sandboxes, though, so we should instead force commonjs resolving for chevrotain 10.x.x.

An alternative solution is to alias chevrotain 10.x.x to 11.x.x

@codesandbox
Copy link

codesandbox bot commented Jan 15, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@CompuIves CompuIves merged commit 76af7df into master Jan 15, 2025
14 of 16 checks passed
@CompuIves CompuIves deleted the fix/chevrotain-esm branch January 15, 2025 12:59
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.

2 participants