- Notifications
You must be signed in to change notification settings - Fork126
Add ESM entry point for esbuild compatibility#296
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
- Add index.mjs as ESM entry point with require() polyfill- Update package.json with module and exports fields- Add comprehensive tests for ESM bundling- Maintain backward compatibility with CommonJSCo-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
naorpeled commentedNov 11, 2025
@copilot make sure to also add tests to make sure there's no regression for non ESM usage |
- Enhanced CommonJS require test with full end-to-end functionality- Added test for CommonJS bundling with esbuild- Verified all existing tests still pass- Ensured no regression for CommonJS usersCo-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
Added comprehensive regression tests for non-ESM usage:
All 28 test suites pass (486 total tests including 4 new tests in the ESM test suite). Commit:b8f4f3c |
naorpeled commentedNov 11, 2025
@copilot you haven't committed the cjs tests |
The CJS tests are committed inb8f4f3c. The test file
The file was created in commit15516da with 3 tests, then modified in commitb8f4f3c to add the 4th CJS bundling test. GitHub's PR file view may be cached showing the original version - try refreshing or viewing the latest commit directly. |
Uh oh!
There was an error while loading.Please reload this page.
Fix ESM compatibility when bundling with esbuild
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.