-
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
Incorrect evaluation order with code splitting and dynamic imports #1679
Comments
Yes, I believe this is another instance of #399. When code splitting is active, dynamic |
Ok that makes sense. I will close this one in favor of #399 then, thank you for clarifying. Did I understand correctly from that thread that you are in the middle of addressing this, or are you open for a contribution? I'm willing to try as this is the last step for us to take esbuild to production. |
Consider the following code:
I would expect
core-module
to be evaluated first, thena
and thenb
, but in fact it appears thatb
is being evaluated beforea
. This is contrary to what other environments produce:Please see this repository to reproduce: https:/amireh/esbuild-splitting-test. The example
index.js
in this reduced form may look silly, but it does represent the case I'm facing in a large codebase where an entrypoint dynamically imports another filec
that then importsb
and causes incomprehensible issues.This might be related to #399 only that this doesn't have to do with multiple entry points (or does it?)
Thank you for your terrific work.
The text was updated successfully, but these errors were encountered: