Bladeren bron

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é 5 jaren geleden
bovenliggende
commit
0701ed7e93
1 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 3
    2
      webpack.config.js

+ 3
- 2
webpack.config.js Bestand weergeven

@@ -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

Laden…
Annuleren
Opslaan