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 haven't looked into the code you linked to. However, you should be aware that there are known ordering bugs with esbuild's current code splitting implementation: #399. This is explicitly called out at the top of the documentation for code splitting: https://esbuild.github.io/api/#splitting.
Can you refer to the code organization method of webpack, and register and call through the file name.
The order of the output code content is not the order of actual loading and parsing, but when the program starts to execute, it starts to execute according to the reference relationship.
The issue project git repo https://github.com/noyobo/esbuild-issues/tree/chunk-order
npm run build
esbuild config https://github.com/noyobo/esbuild-issues/blob/a4ecc9edf322c26f74aba5c1767379a20653e727/scripts/build.js#LL1C1-L1C1
There is a problem with the output chunk code.
https://github.com/noyobo/esbuild-issues/blob/a4ecc9edf322c26f74aba5c1767379a20653e727/dist/chunk-AFYZHPWT.js#L133
Line 133 calls
dp_default.dpMaps
butdp_default
is defined on line 195 https://github.com/noyobo/esbuild-issues/blob/a4ecc9edf322c26f74aba5c1767379a20653e727/dist/chunk-AFYZHPWT.js#L195actual execution throws an error
Uncaught TypeError: Cannot read properties of undefined (reading 'dpMaps')
The text was updated successfully, but these errors were encountered: