Skip to content

Commit

Permalink
perf: use swc-loader
Browse files Browse the repository at this point in the history
around 16% faster (from 45.91s to 38.3s)
  • Loading branch information
nocontribute authored and tgodzik committed Aug 26, 2024
1 parent 2635cdf commit 424c00f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,22 @@ export default {
"src": "img/scalameta-logo.png"
}
}
},
webpack: {
jsLoader: (isServer) => ({
loader: "swc-loader",
options: {
jsc: {
parser: {
syntax: "typescript",
tsx: true,
},
target: "es2020",
},
module: {
type: isServer ? "commonjs" : "es6",
},
},
}),
}
} satisfies Config

0 comments on commit 424c00f

Please sign in to comment.