You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect core-module to be evaluated first, then a and then b, but in fact it appears that b is being evaluated before a. This is contrary to what other environments produce:
Please see this repository to reproduce: https://github.com/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 file c that then imports b 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:
Yes, I believe this is another instance of #399. When code splitting is active, dynamic import() creates another entry point for the imported file which is why the output file contains both index.js and b-[hash].js.
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://github.com/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: