-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Parcel emulates require('underscore') incorrectly #2865
Comments
Thanks for reaching out. Your sandbox is importing Underscore twice in the same module, once with ESM syntax and once with CommonJS syntax. This is probably causing Parcel to use the same underlying ESM module in both cases and then to emulate the Is your actual code different? Otherwise, this is just a case of "sorry, incorrect usage is not expected to work". |
Thanks for answer. |
In that case, Parcel is resolving the path for your Adding to that, emulating WebPack has roughly the same issue, see #2852 and webpack/webpack#5756. Browserify and Rollup do not suffer from these problems. Please report these bugs to the Parcel developers (maybe someone already did that). Until they have solved it, you have a couple of options to work around the problem:
I will close this ticket now, but please feel welcome to continue the discussion. |
Hello, after underscore 1.10 update, OOP style broke down with
_ is not a function
error, if useconst _ = require('underscore')
on client.Sandbox example: https://codesandbox.io/s/eloquent-galileo-tf9je?file=/src/index.js
The text was updated successfully, but these errors were encountered: