Преглед на файлове

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 месеца
родител
ревизия
f0d2106c1a
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4
    4
      webpack.config.js

+ 4
- 4
webpack.config.js Целия файл

142
                         require.resolve('@babel/preset-react')
142
                         require.resolve('@babel/preset-react')
143
                     ]
143
                     ]
144
                 },
144
                 },
145
-                test: /\.jsx?$/,
145
+                test: /\.(j|t)sx?$/,
146
                 exclude: /node_modules/
146
                 exclude: /node_modules/
147
             }, {
147
             }, {
148
                 // Allow CSS to be imported into JavaScript.
148
                 // Allow CSS to be imported into JavaScript.
322
                 ...config.plugins,
322
                 ...config.plugins,
323
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'analytics-ga')
323
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'analytics-ga')
324
             ],
324
             ],
325
-            performance: getPerformanceHints(perfHintOptions, 5 * 1024)
325
+            performance: getPerformanceHints(perfHintOptions, 35 * 1024)
326
         }),
326
         }),
327
         Object.assign({}, config, {
327
         Object.assign({}, config, {
328
             entry: {
328
             entry: {
347
                 ...config.plugins,
347
                 ...config.plugins,
348
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'external_api')
348
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'external_api')
349
             ],
349
             ],
350
-            performance: getPerformanceHints(perfHintOptions, 85 * 1024)
350
+            performance: getPerformanceHints(perfHintOptions, 95 * 1024)
351
         }),
351
         }),
352
         Object.assign({}, config, {
352
         Object.assign({}, config, {
353
             entry: {
353
             entry: {
401
                 ...config.plugins,
401
                 ...config.plugins,
402
                 ...getBundleAnalyzerPlugin(analyzeBundle, 'screenshot-capture-worker')
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…
Отказ
Запис