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",
diff --git a/bundle/.swcrc b/bundle/.swcrc
index dcf4af8e..d1689115 100644
--- a/bundle/.swcrc
+++ b/bundle/.swcrc
@@ -1,23 +1,26 @@
{
- "jsc": {
- "parser": {
- "syntax": "ecmascript",
- "jsx": false,
- "dynamicImport": false,
- "privateMethod": false,
- "functionBind": false,
- "exportDefaultFrom": false,
- "exportNamespaceFrom": false,
- "decorators": false,
- "decoratorsBeforeExport": false,
- "topLevelAwait": false,
- "importMeta": false
- },
- "transform": null,
- "target": "es2021",
- "loose": false,
- "externalHelpers": false,
- // Requires v1.2.50 or upper and requires target to be es2016 or upper.
- "keepClassNames": false
- }
- }
\ No newline at end of file
+ "module": {
+ "type": "commonjs"
+ },
+ "jsc": {
+ "parser": {
+ "syntax": "ecmascript",
+ "jsx": false,
+ "dynamicImport": false,
+ "privateMethod": false,
+ "functionBind": false,
+ "exportDefaultFrom": false,
+ "exportNamespaceFrom": false,
+ "decorators": false,
+ "decoratorsBeforeExport": false,
+ "topLevelAwait": false,
+ "importMeta": false
+ },
+ "transform": null,
+ "target": "es2021",
+ "loose": false,
+ "externalHelpers": false,
+ // Requires v1.2.50 or upper and requires target to be es2016 or upper.
+ "keepClassNames": false
+ }
+}
diff --git a/cdn/.swcrc b/cdn/.swcrc
index f04801b8..9a89b49d 100644
--- a/cdn/.swcrc
+++ b/cdn/.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/dashboard/.swcrc b/dashboard/.swcrc
deleted file mode 100644
index dcf4af8e..00000000
--- a/dashboard/.swcrc
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "jsc": {
- "parser": {
- "syntax": "ecmascript",
- "jsx": false,
- "dynamicImport": false,
- "privateMethod": false,
- "functionBind": false,
- "exportDefaultFrom": false,
- "exportNamespaceFrom": false,
- "decorators": false,
- "decoratorsBeforeExport": false,
- "topLevelAwait": false,
- "importMeta": false
- },
- "transform": null,
- "target": "es2021",
- "loose": false,
- "externalHelpers": false,
- // Requires v1.2.50 or upper and requires target to be es2016 or upper.
- "keepClassNames": false
- }
- }
\ No newline at end of file
diff --git a/gateway/.swcrc b/gateway/.swcrc
index f04801b8..9a89b49d 100644
--- a/gateway/.swcrc
+++ b/gateway/.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/rtc/.swcrc b/rtc/.swcrc
deleted file mode 100644
index f04801b8..00000000
--- a/rtc/.swcrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "jsc": {
- "parser": {
- "syntax": "typescript",
- "decorators": true
- },
- "target": "es2021"
- }
-}
\ No newline at end of file
diff --git a/util/.swcrc b/util/.swcrc
index f04801b8..9a89b49d 100644
--- a/util/.swcrc
+++ b/util/.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/webrtc/.swcrc b/webrtc/.swcrc
index f04801b8..9a89b49d 100644
--- a/webrtc/.swcrc
+++ b/webrtc/.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"
+ }
+}
|