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:
parent
1169b862b3
commit
eca33fcc37
12
.babelrc
12
.babelrc
@ -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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user