move required ling-ui babel's part to webpack from common .babelrc

This commit is contained in:
Roman committed 2020-06-18 15:34:32 +03:00
1 parent 1169b862b3
commit eca33fcc37
2 files changed
+12 -11

No files matched your search

+2 -10
View File
@@ -1,20 +1,12 @@
{
"presets": [
["@babel/preset-env", {
"modules": "commonjs"
}],
"@babel/preset-env",
"@babel/preset-react",
"@lingui/babel-preset-react"
],
"plugins": [
"macros",
"@babel/plugin-syntax-dynamic-import",
[
"@babel/plugin-transform-runtime",
{
"regenerator": true,
"useESModules": true
}
]
"@babel/plugin-transform-runtime"
]
}
+10 -1
View File
@@ -57,7 +57,16 @@ export function webpackConfigReact(): webpack.Configuration {
test: /\.tsx?$/,
exclude: /node_modules/,
use: [
"babel-loader",
{
loader: "babel-loader",
options: {
presets: [
["@babel/preset-env", {
modules: "commonjs" // ling-ui
}],
]
}
},
{
loader: "ts-loader",
options: {