Skip to content

Commit

Permalink
fix: incorrect resolve alias
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Sep 7, 2024
1 parent 37d5cba commit 06e05d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/createRspackCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,17 @@ function resolveRspackOptions({
watch = false,
}: CompilerOptions): RspackOptions {
const targets = ['node >= 18.0.0']
if (alias && '@swc/helpers' in alias) {
delete alias['@swc/helpers']
}

return {
mode: 'production',
context: cwd,
entry: entryFile,
watch,
target: 'node18.0',
externalsType: isEsm ? 'module' : 'commonjs2',
externals: /^[^./].*/,
resolve: {
alias,
extensions: ['.js', '.ts', '.cjs', '.mjs', '.json5', '.json'],
Expand Down

0 comments on commit 06e05d9

Please sign in to comment.