summary refs log tree commit diff
path: root/bundle/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-08 10:43:43 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-08 10:43:43 +0200
commitb44f356d9efbdfdae920f0a7853df20c366b5fc8 (patch)
treeff2c8f2fe76c0ff7cf6e798a731df8ad9dfd2d1c /bundle/src
parentMerge branch 'compiler-change' of https://github.com/thearcanebrony/fosscord-... (diff)
downloadserver-b44f356d9efbdfdae920f0a7853df20c366b5fc8.tar.xz
:sparkles: bundle build script
Diffstat (limited to 'bundle/src')
-rw-r--r--bundle/src/start.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/bundle/src/start.ts b/bundle/src/start.ts
index 353ebfc6..872f324e 100644
--- a/bundle/src/start.ts
+++ b/bundle/src/start.ts
@@ -1,4 +1,20 @@
 // process.env.MONGOMS_DEBUG = "true";
+const tsConfigPaths = require("tsconfig-paths");
+const path = require("path");
+const baseUrl = path.join(__dirname, ".."); // Either absolute or relative path. If relative it's resolved to current working directory.
+const cleanup = tsConfigPaths.register({
+	baseUrl,
+	paths: {
+		"@fosscord/api": ["../api/dist/index.js"],
+		"@fosscord/api/*": ["../api/dist/*"],
+		"@fosscord/gateway": ["../gateway/dist/index.js"],
+		"@fosscord/gateway/*": ["../gateway/dist/*"],
+		"@fosscord/cdn": ["../cdn/dist/index.js"],
+		"@fosscord/cdn/*": ["../cdn/dist/*"],
+	},
+});
+
+import "reflect-metadata";
 import cluster from "cluster";
 import os from "os";
 import { red, bold, yellow, cyan } from "nanocolors";