Skip to content

Commit

Permalink
fix(swc): update binding to reduce package size (#4687)
Browse files Browse the repository at this point in the history
* fix(swc): update binding to reduce package size

* Update eleven-wolves-look.md

---------

Co-authored-by: neverland <[email protected]>
  • Loading branch information
JSerFeng and chenjiahan authored Sep 20, 2023
1 parent 85e4401 commit a45cc5b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 35 deletions.
6 changes: 6 additions & 0 deletions .changeset/eleven-wolves-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/libuild-plugin-swc': patch
'@modern-js/builder-plugin-swc': patch
---

fix(swc): update binding to reduce package size
2 changes: 1 addition & 1 deletion packages/builder/plugin-swc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@modern-js/builder-shared": "workspace:*",
"@modern-js/swc-plugins": "0.6.3",
"@modern-js/swc-plugins": "0.6.4",
"@modern-js/utils": "workspace:*",
"@swc/helpers": "0.5.1",
"core-js": "~3.32.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/libuild/libuild-plugin-swc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@modern-js/libuild-utils": "workspace:*"
},
"dependencies": {
"@modern-js/swc-plugins": "0.6.3",
"@modern-js/swc-plugins": "0.6.4",
"chalk": "4.1.0"
},
"files": [
Expand Down
60 changes: 30 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions tests/integration/swc/tests/decorator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ describe('swc use new decorator', () => {
await modernBuild(appDir);

const jsFiles = getJsFiles(appDir);
expect(
jsFiles.every(item => !item.includes('@swc/helpers/esm/_decorate.js')),
).toBeTruthy();
expect(jsFiles.some(item => item.includes('_ts_decorate'))).toBeTruthy();
});
});

0 comments on commit a45cc5b

Please sign in to comment.