Skip to content

Commit

Permalink
use SWC compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
zenkiet committed Sep 21, 2023
1 parent e183170 commit 31b37b7
Show file tree
Hide file tree
Showing 5 changed files with 648 additions and 15 deletions.
1 change: 1 addition & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist
/node_modules


# Logs
logs
*.log
Expand Down
20 changes: 20 additions & 0 deletions server/.swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"sourceMaps": true,
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"minify": false
}
2 changes: 2 additions & 0 deletions server/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"builder": "swc",
"typeCheck": true,
"deleteOutDir": true
}
}
7 changes: 5 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"@nestjs/cli": "^10.0.0",
"@nestjs/schematics": "^10.0.0",
"@nestjs/testing": "^10.0.0",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.86",
"@swc/jest": "^0.2.29",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
Expand All @@ -39,7 +42,7 @@
"eslint": "^8.42.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"jest": "^29.6.4",
"prettier": "^3.0.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
Expand All @@ -58,7 +61,7 @@
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
"^.+\\.(t|j)s?$": ["@swc/jest"]
},
"collectCoverageFrom": [
"**/*.(t|j)s"
Expand Down
Loading

0 comments on commit 31b37b7

Please sign in to comment.