Selaa lähdekoodia

fix(build) apply @babel/preset-env also to TS files

Without it, we cannot detect what features to polyfill.

Some bundles have seen a size increase, this is due to necessary
polyfills now being included as usage was detected.
factor2
Saúl Ibarra Corretgé 4 kuukautta sitten
vanhempi
commit
f0d2106c1a
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4
    4
      webpack.config.js

+ 4
- 4
webpack.config.js Näytä tiedosto

@@ -142,7 +142,7 @@ function getConfig(options = {}) {
142 142
                         require.resolve('@babel/preset-react')
143 143
                     ]
144 144
                 },
145
-                test: /\.jsx?$/,
145
+                test: /\.(j|t)sx?$/,
146 146
                 exclude: /node_modules/
147 147
             }, {
148 148
                 // Allow CSS to be imported into JavaScript.
@@ -322,7 +322,7 @@ module.exports = (_env, argv) => {
322 322
                 ...config.plugins,
323 323
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'analytics-ga')
324 324
             ],
325
-            performance: getPerformanceHints(perfHintOptions, 5 * 1024)
325
+            performance: getPerformanceHints(perfHintOptions, 35 * 1024)
326 326
         }),
327 327
         Object.assign({}, config, {
328 328
             entry: {
@@ -347,7 +347,7 @@ module.exports = (_env, argv) => {
347 347
                 ...config.plugins,
348 348
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'external_api')
349 349
             ],
350
-            performance: getPerformanceHints(perfHintOptions, 85 * 1024)
350
+            performance: getPerformanceHints(perfHintOptions, 95 * 1024)
351 351
         }),
352 352
         Object.assign({}, config, {
353 353
             entry: {
@@ -401,7 +401,7 @@ module.exports = (_env, argv) => {
401 401
                 ...config.plugins,
402 402
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'screenshot-capture-worker')
403 403
             ],
404
-            performance: getPerformanceHints(perfHintOptions, 4 * 1024)
404
+            performance: getPerformanceHints(perfHintOptions, 30 * 1024)
405 405
         })
406 406
     ];
407 407
 };

Loading…
Peruuta
Tallenna