Skip to content

Commit 81a9293

Browse files
authored
feat: disable swc mangle as it creates build errors (#71)
### Developer Checklist (Definition of Done) **Issue** - [x] All acceptance criteria from the issue are met - [x] Tested in latest Chrome/Firefox **UI/UX/Vis** - [ ] Requires UI/UX/Vis review - [ ] Reviewer(s) are notified (_tag assignees_) - [ ] Review has occurred (_link to notes_) - [ ] Feedback is included in this PR - [ ] Reviewer(s) approve of concept and design **Code** - [x] Branch is up-to-date with the branch to be merged with, i.e., develop - [x] Code is cleaned up and formatted - [ ] Unit tests are written (frontend/backend if applicable) - [ ] Integration tests are written (if applicable) **PR** - [x] Descriptive title for this pull request is provided (will be used for release notes later) - [x] Reviewer and assignees are defined - [x] Add type label (e.g., *bug*, *feature*) to this pull request - [x] Add release label (e.g., `release: minor`) to this PR following [semver](https://semver.org/) - [x] The PR is connected to the corresponding issue (via `Closes #...`) - [x] [Summary of changes](#summary-of-changes) is written ### Summary of changes - Disable `mangle` (alongside `compress`) as it creates wrong closures, breaking dependencies like arquero. See attached issue in comment. ### Screenshots ### Additional notes for the reviewer(s) - Thanks for creating this pull request 🤗
2 parents 06c2f2b + 0e6bbe4 commit 81a9293

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/rspack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,11 @@ module.exports = (webpackEnv, argv) => {
188188
},
189189
optimization: {
190190
minimizer: [
191-
// Disable compress as it has some bugs, i.e. when using arquero#from it fails if no names are passed.
191+
// Disable compress and mangle as it has some bugs, i.e. when using arquero#from it fails if no names are passed.
192192
// See https://github.com/web-infra-dev/rspack/issues/4980 for a discussion.
193193
new SwcJsMinimizerRspackPlugin({
194194
compress: false,
195+
mangle: false,
195196
}),
196197
new SwcCssMinimizerRspackPlugin(),
197198
],

0 commit comments

Comments
 (0)