Browse Source

build config

David Sehnal 5 years ago
parent
commit
78c50a4339
2 changed files with 7 additions and 12 deletions
  1. 4 4
      package.json
  2. 3 8
      webpack.config.common.js

+ 4 - 4
package.json

@@ -17,12 +17,12 @@
     "build-tsc": "tsc --incremental",
     "build-extra": "cpx \"src/**/*.{scss,woff,woff2,ttf,otf,eot,svg,html,ico}\" lib/",
     "build-webpack": "webpack --mode production",
-    "watch": "concurrently --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack\"",
-    "watch-viewer": "concurrently --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack-viewer\"",
+    "watch": "concurrently -c \"green,gray,gray\" --names \"tsc,ext,wpc\" --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack\"",
+    "watch-viewer": "concurrently -c \"green,gray,gray\" --names \"tsc,ext,wpc\" --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack-viewer\"",
     "watch-tsc": "tsc --watch --incremental",
     "watch-extra": "cpx \"src/**/*.{scss,woff,woff2,ttf,otf,eot,svg,html,ico}\" lib/ --watch",
-    "watch-webpack": "webpack -w --mode development --display minimal",
-    "watch-webpack-viewer": "webpack -w --mode development --display minimal --config ./webpack.config.viewer.js",
+    "watch-webpack": "webpack -w --mode development --display errors-only --info-verbosity verbose",
+    "watch-webpack-viewer": "webpack -w --mode development --display errors-only --info-verbosity verbose --config ./webpack.config.viewer.js",
     "serve": "http-server -p 1338",
     "model-server": "node lib/servers/model/server.js",
     "model-server-watch": "nodemon --watch lib lib/servers/model/server.js",

+ 3 - 8
webpack.config.common.js

@@ -29,14 +29,6 @@ const sharedConfig = {
         //     failOnError: false,
         //     cwd: process.cwd(),
         // }),
-        new webpack.ProvidePlugin({
-            '__assign': ['tslib', '__assign'],
-            '__extends': ['tslib', '__extends'],
-            '__awaiter': ['tslib', '__awaiter'],
-            '__generator': ['tslib', '__generator'],
-            '__spread': ['tslib', '__spread'],
-            '__spreadArrays': ['tslib', '__spreadArrays'],
-        }),
         new ExtraWatchWebpackPlugin({
             files: [
                 './lib/**/*.scss',
@@ -55,6 +47,9 @@ const sharedConfig = {
             path.resolve(__dirname, 'lib/')
         ],
     },
+    watchOptions: {
+        aggregateTimeout: 750
+    },
     devtool: ''
 }