Skip to content

Commit

Permalink
fix(rsdoctor): change loader config (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
easy1090 authored Feb 2, 2024
1 parent 0e3f1dd commit db85211
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions rsdoctor/arco-pro/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,44 +36,48 @@ const config = {
{
test: /\.(j|t)s$/,
exclude: [/[\\/]node_modules[\\/]/],
loader: "builtin:swc-loader",
options: {
sourceMap: false,
jsc: {
parser: {
syntax: "typescript",
use: {
loader: "builtin:swc-loader",
options: {
sourceMap: false,
jsc: {
parser: {
syntax: "typescript",
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48",
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48",
},
},
}
},
{
test: /\.(j|t)sx$/,
loader: "builtin:swc-loader",
exclude: [/[\\/]node_modules[\\/]/],
options: {
sourceMap: false,
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
transform: {
react: {
runtime: "automatic",
development: !prod,
refresh: !prod,
use: {
loader: "builtin:swc-loader",
options: {
sourceMap: false,
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
transform: {
react: {
runtime: "automatic",
development: !prod,
refresh: !prod,
},
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48",
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48",
},
},
}
},
{
test: /\.png$/,
Expand Down

0 comments on commit db85211

Please sign in to comment.