Sfoglia il codice sorgente

Webpack: Don't include banner in non-entry files

This prevents the plugin from mangling wasm files :)
Danilo Bargen 6 anni fa
parent
commit
72c699880a
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      webpack.prod.js

+ 2 - 2
webpack.prod.js

@@ -31,9 +31,9 @@ module.exports = merge(common, {
     pathinfo: false
   },
   plugins: [
-    new webpack.DefinePlugin({"process.env.NODE_ENV": JSON.stringify("production")}),
+    new webpack.DefinePlugin({'process.env.NODE_ENV': JSON.stringify('production')}),
     new webpack.optimize.ModuleConcatenationPlugin(),
     new webpack.NoEmitOnErrorsPlugin(),
-    new webpack.BannerPlugin({banner: banner}),
+    new webpack.BannerPlugin({banner: banner, entryOnly: true}),
   ],
 });