Skip to content

Commit

Permalink
build: migrate to swc builds both for app and unit tests (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss authored Aug 28, 2024
1 parent 245128b commit 2af1760
Show file tree
Hide file tree
Showing 7 changed files with 1,407 additions and 832 deletions.
17 changes: 17 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"sourceMaps": true,
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"baseUrl": "./"
},
"minify": false
}
12 changes: 12 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"testTimeout": 120000,
"setupFiles": ["dotenv/config"],
"rootDir": "src",
"testRegex": ".*\\.spec\\.ts$",
"transform": {
"^.+\\.(t|j)s$": ["@swc/jest"]
},
"collectCoverageFrom": ["**/*.(t|j)s"],
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
6 changes: 5 additions & 1 deletion nest-cli.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"collection": "@nestjs/schematics",
"sourceRoot": "src"
"sourceRoot": "src",
"compilerOptions": {
"builder": "swc",
"typeCheck": true
}
}
Loading

0 comments on commit 2af1760

Please sign in to comment.