-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Code splitting issue with 0.11.5 #1122
Comments
One thing to check is whether
Of course |
Good catch 👍 thanks! The value was: const BROWSER_TARGET = ['chrome61', 'firefox60', 'safari11', 'edge18']; It's now working with: const BROWSER_TARGET = ['chrome63', 'firefox67', 'safari11.1', 'edge79'];
It'd be easier to debug as a build failure 👍 Runtime errors are harder to notice, especially when code splitting is used to load "less important" code components. A warning could also work: still generate |
@evanw otherwise why not always compile to |
I think this is problematic when using esbuild with other bundlers that look for the import syntax. If a Chrome browser target is less than Chrome 63 but webpack is handling imports and code splitting, esbuild is preventing that code splitting that was otherwise working in the old browser. Seeing as esbuild is being commonly used as a fast transform alongside other bundlers, it seems like this could be a use case worth considering, potentially as an opt-in. I think the only other option with webpack would be to use the legacy |
Following #1088, 0.11.5 worked for our code-base, everything is loading correctly except dynamic import (code splitting)
Code like:
is compiled to:
and fails during import with:
the configuration looks like:
I'm still investigating the root cause and I'll post updates with my findings.
The text was updated successfully, but these errors were encountered: