Skip to content

Commit

Permalink
Upgrade to newest swc for performance
Browse files Browse the repository at this point in the history
This also removes a now-erroneous case of SWC config where the env and target options conflict. Let's stick with target, it seems to be preferred internally by swc.
  • Loading branch information
airhorns committed Sep 5, 2023
1 parent 85acd14 commit 5ade57f
Show file tree
Hide file tree
Showing 5 changed files with 713 additions and 671 deletions.
5 changes: 0 additions & 5 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"env": {
"targets": {
"node": 18
}
},
"jsc": {
"parser": {
"syntax": "typescript",
Expand Down
12 changes: 1 addition & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ module.exports = {

```json
{
"env": {
"targets": {
"node": 16
}
},
"jsc": {
"parser": {
"syntax": "typescript",
Expand Down Expand Up @@ -124,18 +119,13 @@ And then, you can use `swc`'s standard syntax for the `.swcrc` file
```json
// in .swcrc, these are the defaults wds uses
{
"env": {
"targets": {
"node": 16
}
},
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
},
"target": "es2020"
"target": "es2022"
},
"module": {
"type": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"dependencies": {
"@cspotcode/source-map-support": "^0.8.1",
"@swc/core": "^1.3.58",
"@swc/core": "^1.3.82",
"chokidar": "^3.5.3",
"find-root": "^1.1.0",
"find-yarn-workspace-root": "^2.0.0",
Expand Down
Loading

0 comments on commit 5ade57f

Please sign in to comment.