How to turn off auto @swc/helpers alias #3711
-
rsbuild会自动注入alias配置,将@swc/helpers指向@rsbuild/core所有目录的node_modules,如果项目中有其他包依赖了不同版本的@swc/helpers,例如0.3.x,构建就会报错,因为0.5.x的版本和0.3.x的版本有break-change |
Beta Was this translation helpful? Give feedback.
Answered by
chenjiahan
Oct 14, 2024
Replies: 2 comments 2 replies
-
Try this: // rsbuild.config.ts
export default defineConfig({
tools: {
rspack(config) {
if (config.resolve?.alias) {
delete config.resolve.alias['@swc/helpers'];
}
}
}
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
chenjiahan
-
In the next release (#3715): export default {
source: {
alias: (alias) => {
delete alias['@swc/helpers'];
},
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this: