Explorar el Código

Remove NODE_ENV from webpack setting. Added splitting for production #231

Benjamin Giesinger hace 7 años
padre
commit
85b36a65df
Se han modificado 3 ficheros con 6 adiciones y 3 borrados
  1. 1 1
      .travis.yml
  2. 0 1
      webpack.common.js
  3. 5 1
      webpack.prod.js

+ 1 - 1
.travis.yml

@@ -1,7 +1,7 @@
 sudo: false
 language: node_js
 node_js:
-- '5'
+- '6'
 notifications:
   email: false
   slack:

+ 0 - 1
webpack.common.js

@@ -32,7 +32,6 @@ module.exports = {
         }),
         new webpack.EnvironmentPlugin({
             STATIC_FILES_SUBFOLDER: false, // Set to other directory if NOT using webpack-dev-server
-            NODE_ENV: 'development', // use 'development' unless process.env.NODE_ENV is defined
             DEBUG: false,
             DRAW_BOUNDING_BOX_ELEMENT: false //  Specifies the element to draw bounding boxes for (e.g. 'GraphicalLabels'). If 'all', bounding boxes are drawn for all elements.
         }),

+ 5 - 1
webpack.prod.js

@@ -17,7 +17,11 @@ module.exports = merge(common, {
     },
     mode: 'production',
     optimization: {
-        minimize: true
+        minimize: true,
+        splitChunks: {
+            chunks: 'all',
+            name: false
+        }
     },
     plugins: [
         // build optimization plugins