Ver código fonte

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

This prevents the plugin from mangling wasm files :)
Danilo Bargen 6 anos atrás
pai
commit
72c699880a
1 arquivos alterados com 2 adições e 2 exclusões
  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}),
   ],
 });