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,6 +31,22 @@ export default function (): webpack.Configuration {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
// for lingui
|
||||
// https://lingui.js.org/guides/typescript.html
|
||||
// just in case these are not in .babelrc
|
||||
presets: [
|
||||
["@babel/preset-env"],
|
||||
["@babel/preset-react"],
|
||||
["@lingui/babel-preset-react"]
|
||||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
transpileOnly: true,
|
||||
@ -40,9 +56,15 @@ export default function (): webpack.Configuration {
|
||||
compilerOptions: {
|
||||
declaration: true, // output .d.ts
|
||||
sourceMap: false, // to override sourceMap: true in tsconfig.json
|
||||
outDir // where the .d.ts should be located
|
||||
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
|
||||
// in src/renderer/components/dock/terminal.ts 95:25-65
|
||||
|
||||
Loading…
Reference in New Issue
Block a user