mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add babel-loader to fxi lingui related issues
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
parent
d569c104ba
commit
78400e51fc
@ -31,18 +31,40 @@ export default function (): webpack.Configuration {
|
|||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
loader: "ts-loader",
|
exclude: /node_modules/,
|
||||||
options: {
|
use: [
|
||||||
transpileOnly: true,
|
{
|
||||||
// !! ts-loader will use tsconfig.json at folder root
|
loader: "babel-loader",
|
||||||
// !! changes in tsconfig.json may have side effects
|
options: {
|
||||||
// !! on '@k8slens/extensions' module
|
// for lingui
|
||||||
compilerOptions: {
|
// https://lingui.js.org/guides/typescript.html
|
||||||
declaration: true, // output .d.ts
|
// just in case these are not in .babelrc
|
||||||
sourceMap: false, // to override sourceMap: true in tsconfig.json
|
presets: [
|
||||||
outDir // where the .d.ts should be located
|
["@babel/preset-env"],
|
||||||
|
["@babel/preset-react"],
|
||||||
|
["@lingui/babel-preset-react"]
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "ts-loader",
|
||||||
|
options: {
|
||||||
|
transpileOnly: true,
|
||||||
|
// !! ts-loader will use tsconfig.json at folder root
|
||||||
|
// !! changes in tsconfig.json may have side effects
|
||||||
|
// !! on '@k8slens/extensions' module
|
||||||
|
compilerOptions: {
|
||||||
|
declaration: true, // output .d.ts
|
||||||
|
sourceMap: false, // to override sourceMap: true in tsconfig.json
|
||||||
|
outDir, // where the .d.ts should be located
|
||||||
|
// for lingui
|
||||||
|
// https://lingui.js.org/guides/typescript.html
|
||||||
|
jsx: "preserve",
|
||||||
|
target: "es2016"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
// for src/renderer/components/fonts/roboto-mono-nerd.ttf
|
// for src/renderer/components/fonts/roboto-mono-nerd.ttf
|
||||||
// in src/renderer/components/dock/terminal.ts 95:25-65
|
// in src/renderer/components/dock/terminal.ts 95:25-65
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user