1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

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

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

View File

@ -1,20 +1,12 @@
{ {
"presets": [ "presets": [
["@babel/preset-env", { "@babel/preset-env",
"modules": "commonjs"
}],
"@babel/preset-react", "@babel/preset-react",
"@lingui/babel-preset-react" "@lingui/babel-preset-react"
], ],
"plugins": [ "plugins": [
"macros", "macros",
"@babel/plugin-syntax-dynamic-import", "@babel/plugin-syntax-dynamic-import",
[ "@babel/plugin-transform-runtime"
"@babel/plugin-transform-runtime",
{
"regenerator": true,
"useESModules": true
}
]
] ]
} }

View File

@ -57,7 +57,16 @@ export function webpackConfigReact(): webpack.Configuration {
test: /\.tsx?$/, test: /\.tsx?$/,
exclude: /node_modules/, exclude: /node_modules/,
use: [ use: [
"babel-loader", {
loader: "babel-loader",
options: {
presets: [
["@babel/preset-env", {
modules: "commonjs" // ling-ui
}],
]
}
},
{ {
loader: "ts-loader", loader: "ts-loader",
options: { options: {