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
Yes output should be deterministic between builds and machines. If the input between two different builds or two different machines is identical and esbuild is generating different outputs, then that's a bug in esbuild itself.
However, there are potentially some things that could cause the input to be different. If the input is different, esbuild's outputs may be different but that's not a bug in esbuild. Some reasons for the input being different:
The relative file path is used as the module identifier, and different package managers put files in different places. So using different package managers causes the input to be different between builds. The fix is to always use the same package manager. See [FeatureRequest] reproducable build among npm and pnpm #1499.
Plugins may use non-deterministic names for virtual files generated during the build. In that case the input may be different between builds. The plugin needs to be fixed in this case, not esbuild. See [Bug?] hash not stable with same files #1530.
Also build output is not guaranteed to stay the same across different esbuild versions.
What I mean is:
If I minify one file with esbuild (real world example with vite):
Will it create the same minified file between different builds and/or different machines?
The text was updated successfully, but these errors were encountered: