Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
0701ed7e93
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3
    2
      webpack.config.js

+ 3
- 2
webpack.config.js Näytä tiedosto

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

Loading…
Peruuta
Tallenna