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

fix: update chevrotain #284

Merged
merged 6 commits into from
Sep 4, 2023
Merged

Conversation

kousun12
Copy link
Contributor

@kousun12 kousun12 commented Sep 1, 2023

Why

Came across this issue while developing a new nextjs project. It seems like the bundler does't find a default export from api.js. Chevrotain 11 is pure ESM, so there are only named exports, which means it shouldn't look for a default export at all.

./node_modules/chevrotain/lib_esm/api_esm.mjs
Attempted import error: '../lib/src/api.js' does not contain a default export (imported as 'mod').

Import trace for requested module:
./node_modules/chevrotain/lib_esm/api_esm.mjs
./node_modules/three-stdlib/loaders/VRMLLoader.js
./node_modules/three-stdlib/index.js
./node_modules/@react-three/drei/web/Select.js
./node_modules/@react-three/drei/index.js
./components/Graphic.tsx

What

Updated Chevrotain version to 11

Checklist

  • Documentation updated
  • Storybook entry added
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 1, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 718bd7d:

Sandbox Source
Vanilla Configuration

@CodyJasonBennett
Copy link
Member

Chevrotain being ESM-only means that we have to bundle it ourselves for CJS. I can update the build config to do so.

@kousun12
Copy link
Contributor Author

kousun12 commented Sep 2, 2023

@CodyJasonBennett got it - thanks

@CodyJasonBennett CodyJasonBennett merged commit 644d2ad into pmndrs:main Sep 4, 2023
2 checks passed
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

🎉 This PR is included in version 2.25.1 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants