summary refs log tree commit diff
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
commitb5905c1bba38cf95b89d716ebea59081209e7df3 (patch)
tree940f5d8f092c0600efcd4989ee99630bca4e680f
parentCompiler test (diff)
downloadserver-b5905c1bba38cf95b89d716ebea59081209e7df3.tar.xz
:bug: fix swcrc config: rewrite import -> require
-rw-r--r--api/.swcrc19
-rw-r--r--api/package.json2
-rw-r--r--bundle/.swcrc47
-rw-r--r--cdn/.swcrc19
-rw-r--r--dashboard/.swcrc23
-rw-r--r--gateway/.swcrc19
-rw-r--r--rtc/.swcrc9
-rw-r--r--util/.swcrc19
-rw-r--r--webrtc/.swcrc19
9 files changed, 81 insertions, 95 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",
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"
+	}
+}