ソースを参照

build: exit with an error if bundle sizes increase too much

The currently selected values are a bit above the actual sizes, so if a PR
increases the bundle size enough to trigger the failure, it should bump it.
It better have a good reason for it though!
tags/v0.0.2
Saúl Ibarra Corretgé 6年前
コミット
0701ed7e93
1個のファイルの変更3行の追加2行の削除
  1. 3
    2
      webpack.config.js

+ 3
- 2
webpack.config.js ファイルの表示

@@ -66,8 +66,9 @@ const config = {
66 66
         sourceMapFilename: `[name].${minimize ? 'min' : 'js'}.map`
67 67
     },
68 68
     performance: {
69
-        maxAssetSize: 750000,
70
-        maxEntrypointSize: 750000
69
+        hints: minimize ? 'error' : false,
70
+        maxAssetSize: 750 * 1024,
71
+        maxEntrypointSize: 750 * 1024
71 72
     },
72 73
     plugins: [
73 74
         analyzeBundle

読み込み中…
キャンセル
保存