Chore: Move babel config to a root babel.config.json (#41615)

* Chore: Move babel config to a root babel.config.json

* Re-add babel cache settings to webpack

* Re-add production browserlist in babel config

* re-add babel hot refresh config

* fix storybook
This commit is contained in:
Josh Hunt
2021-11-18 16:38:58 +00:00
committed by GitHub
parent 7dcc5ca199
commit 3b497f3e8d
7 changed files with 73 additions and 63 deletions

View File

@@ -8,7 +8,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const getBabelConfig = require('./babel.config');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = (env = {}) =>
@@ -34,7 +33,10 @@ module.exports = (env = {}) =>
test: /\.tsx?$/,
use: {
loader: 'babel-loader',
options: getBabelConfig({ BABEL_ENV: 'dev' }),
options: {
cacheDirectory: true,
cacheCompression: false,
},
},
exclude: /node_modules/,
},