File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -185,9 +185,13 @@ function maybeOptimizePackage(binPath: string): void {
185185 // place multiple times from different platforms, especially when people use
186186 // Docker. Avoid idempotency issues by just not optimizing when using Yarn.
187187 //
188+ // This also doesn't work with WASM because it is not a single binary executable
189+ // file. See https://github.com/evanw/esbuild/issues/4209
190+ //
188191 // This optimization also doesn't apply when npm's "--ignore-scripts" flag is
189192 // used since in that case this install script will not be run.
190- if ( os . platform ( ) !== 'win32' && ! isYarn ( ) ) {
193+ const { isWASM } = pkgAndSubpathForCurrentPlatform ( )
194+ if ( os . platform ( ) !== 'win32' && ! isYarn ( ) && ! isWASM ) {
191195 const tempPath = path . join ( __dirname , 'bin-esbuild' )
192196 try {
193197 // First link the binary with a temporary file. If this fails and throws an
You can’t perform that action at this time.
0 commit comments