-
Notifications
You must be signed in to change notification settings - Fork 259
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
remove dynamic import statements #231
Comments
Hi, I understand that your PR fixes the string literal issue, but does it really solves the issue of not having some of those optional files? |
Hey @simov, What do you mean with "having some of those optional files"? Require should only be executed for a specific file if the same conditions as before apply. |
How is parcel or esbuild bundling anything in case they are not trying to resolve all paths eagerly by static analysis? That's how webpack works, it tries to bundle all paths found regardless of logical code structure. So what happens is that webpack throws errors #212 for the files that are missing. |
As far as I understand it esbuild is only bundling stuff it can find by static analysis. Thats why all of those |
I did a few tests on my own, fixed in #232 |
@simov thank you :) |
Thanks @simov and others for your great work!
Summary
Importing from paths generated at runtime breaks
parcel, see (parcel-bundler/parcel#4031),
or esbuild, see (evanw/esbuild#480).
Building fails or throws a warning like this:
This can lead to problems at runtime.
The text was updated successfully, but these errors were encountered: