-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Inconsistent build output wrt "use strict" #3284
Comments
Sorry but I can't run your code. Here's what I tried (which was run in GitHub Codespaces):
That gave the following output:
Are there additional commands required to reproduce the issue? |
Sorry, I did omit an important repro step. That branch has been updated. The missing step was I also tried to reproduce without the |
The zsh # get into a zsh terminal, default is bash on Codespaces
repeat 10 DEBUG=1 yarn build-devtools &> /dev/null && md5sum dist/lighthouse-dt-bundle.js && mv dist/lighthouse-dt-bundle.js dist/variant-$(md5sum dist/lighthouse-dt-bundle.js | awk NF=1).js |
I looked into this a bit. This happens because This is an esbuild bug. I'm guessing this is due to symlinks somehow since it happens with the files from |
Version
0.18.17
, Apple silicon macI noticed that my output bundle sometimes differed in its md5 hash. The delta looks like this:
The modules affected always seem to be the same, but a random permuation of them don't include
"use strict"
, resulting in a few different output bundle variants.Repro
The only reproduction I have is extremely non-trivial. The more I reduced it, the less often the bug occurred. Here's what I ended up wtih:
The entry file is just this:
helper.js
:helper2.js
:This is the delta; roughly every 10 runs
"use strict"
is not present for thei18n.js
module.The esbuild invocation is here.
I can attempt to reduce it further if it would assist in debugging. The actual difference seems rather trivial and may not be harmful in practice, so I understand if the best approach is to ignore/close. It was mainly surprising that my bundle did not have the exact same contents every time.
The text was updated successfully, but these errors were encountered: