@@ -1262,7 +1262,7 @@ function npmBuilder(filepath: string, displayPath: string, flags: Flags, buildEn
12621262 debug ( 'Performing npm build for %s' , filepath )
12631263 const cmd = flags . yarn ? 'yarn' : 'npm'
12641264 const npmRunBuild = buildScriptExists ( filepath )
1265- const args = npmRunBuild ? [ 'install' , '&&' , cmd , 'run' , 'build' ] : [ 'install' , '--production' ]
1265+ const args = npmRunBuild ? [ 'install' , '--ignore-scripts' , '&&' , cmd , 'run' , 'build' ] : [ 'install' , '--ignore-scripts ', '--production' ]
12661266 const infoMsg = [ cmd , ...args ] . join ( ' ' )
12671267 if ( flags . incremental ) {
12681268 debug ( 'Detected incremental build' )
@@ -1279,7 +1279,7 @@ function npmBuilder(filepath: string, displayPath: string, flags: Flags, buildEn
12791279 } else {
12801280 debug ( 'Build was not incremental' )
12811281 }
1282- return build ( cmd , args , filepath , displayPath , infoMsg , `${ cmd } install` , flags . verboseBuild , buildEnv , slice , feedback ) . then (
1282+ return build ( cmd , args , filepath , displayPath , infoMsg , `${ cmd } install --ignore-scripts ` , flags . verboseBuild , buildEnv , slice , feedback ) . then (
12831283 ( ) => makeNpmPackageAppearBuilt ( filepath ) )
12841284}
12851285
0 commit comments