-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
[12.0.0][regression] error when bundling the cjs version #2411
Comments
Ah, I looked into this now, and your example actually breaks on every version from 9 and up. 8 is the latest version that works:
|
previous major worked. It just required the util npm polyfill package to be installed if I remember correctly. WIll check. |
Yep, works:
(notice the This was found in a real project currently using the previous major: wixplosives/file-services#523 |
@AviVahl I just ran your commands on all the versions from 8.11 to 9.2.4 and it broke on 9.2.3
This added Will await your confirmation that the fix supplied by perrin checks out before merging. |
I've tested the fix locally by changing ( |
Published as 12.0.1 |
Describe the bug
webpack picks either the commonjs or the esm version, depending on the file requesting it and how it does that (require call or dynamic import from a commonjs file).
esm bundles successfully (esm file importing sinon).
cjs, on the other end (cjs file requiring sinon), gets the following bundling error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both cjs and esm versions should be bundling-compatible.
Context (please complete the following information):
The text was updated successfully, but these errors were encountered: