summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 09:59:04 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 09:59:04 +0200
commit95bb148cfa7b12588d4cd45754e14e2039bdd9a7 (patch)
treea0d97128a8cfcce095bc2d30cbb1b28000f11451 /api
parentCompiler test (diff)
downloadserver-95bb148cfa7b12588d4cd45754e14e2039bdd9a7.tar.xz
:bug: fix swcrc config: rewrite import -> require
Diffstat (limited to 'api')
-rw-r--r--api/.swcrc19
-rw-r--r--api/package.json2
2 files changed, 12 insertions, 9 deletions
diff --git a/api/.swcrc b/api/.swcrc

index f04801b8..9a89b49d 100644 --- a/api/.swcrc +++ b/api/.swcrc
@@ -1,9 +1,12 @@ { - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021" - } -} \ No newline at end of file + "module": { + "type": "commonjs" + }, + "jsc": { + "parser": { + "syntax": "typescript", + "decorators": true + }, + "target": "es2021" + } +} diff --git a/api/package.json b/api/package.json
index 37721728..2764320a 100644 --- a/api/package.json +++ b/api/package.json
@@ -10,7 +10,7 @@ "test": "npm run build && npm run test:only", "test:watch": "jest --watch", "start": "npm run build && node dist/start", - "build": "npx tsc -b .", + "build": "swc src --out-dir dist", "build-docker": "tsc -p tsconfig-docker.json", "dev": "tsnd --respawn src/start.ts", "patch": "ts-patch install -s && npx patch-package",