Skip to content

Commit

Permalink
fix: invalid Rspack config
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Nov 25, 2024
1 parent 63f5c14 commit 0bc4b6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rspack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@ export default defineConfig({
exclude: /node_modules/,
use: {
loader: "builtin:swc-loader",
/** @type {import('@rspack/core').SwcLoaderOptions} */
options: {
env: {
targets: [
"chrome >= 87",
"edge >= 88",
"firefox >= 78",
"safari >= 14",
],
},
jsc: {
target: ["chrome >= 87", "edge >= 88", "firefox >= 78", "safari >= 14"],
parser: {
syntax: "typescript",
tsx: true,
Expand All @@ -49,6 +57,6 @@ export default defineConfig({
].filter(Boolean),
experiments: {
css: true,
lazyCompilation: !isProduction // lazyCompilation should only be enabled in development mode
lazyCompilation: !isProduction, // lazyCompilation should only be enabled in development mode
},
});

0 comments on commit 0bc4b6a

Please sign in to comment.