Skip to content

Commit

Permalink
perf: build backend with swc (#9463)
Browse files Browse the repository at this point in the history
* feat: build backend with swc

* fix: swc build target

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
  • Loading branch information
pikokr and syuilo committed Jan 12, 2023
1 parent 978a9bb commit 4579d02
Show file tree
Hide file tree
Showing 4 changed files with 939 additions and 44 deletions.
12 changes: 11 additions & 1 deletion packages/backend/.swcrc
Expand Up @@ -9,7 +9,17 @@
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
}
},
"experimental": {
"keepImportAssertions": true
},
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
"target": "es2021"
},
"minify": false
}
6 changes: 3 additions & 3 deletions packages/backend/package.json
Expand Up @@ -7,8 +7,8 @@
"start": "node ./built/index.js",
"start:test": "NODE_ENV=test node ./built/index.js",
"migrate": "typeorm migration:run -d ormconfig.js",
"build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json",
"watch": "node watch.mjs",
"build": "swc src -d built -D",
"watch": "swc src -d built -D -w",
"lint": "tsc --noEmit && eslint --quiet \"src/**/*.ts\"",
"jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --runInBand",
"jest-and-coverage": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --forceExit --runInBand",
Expand Down Expand Up @@ -112,7 +112,6 @@
"systeminformation": "5.17.1",
"tinycolor2": "1.5.2",
"tmp": "0.2.1",
"tsc-alias": "1.8.2",
"tsconfig-paths": "4.1.2",
"twemoji-parser": "14.0.0",
"typeorm": "0.3.11",
Expand All @@ -128,6 +127,7 @@
},
"devDependencies": {
"@redocly/openapi-core": "1.0.0-beta.117",
"@swc/cli": "^0.1.59",
"@swc/core": "1.3.25",
"@swc/jest": "0.2.24",
"@types/accepts": "1.3.5",
Expand Down
23 changes: 0 additions & 23 deletions packages/backend/watch.mjs

This file was deleted.

2 comments on commit 4579d02

@syuilo
Copy link
Member

@syuilo syuilo commented on 4579d02 Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

やっぱりビルドできなくなった

@syuilo
Copy link
Member

@syuilo syuilo commented on 4579d02 Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

どうにもならなかったから一旦revert

Please sign in to comment.