summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 18:20:03 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-07 18:20:03 +0200
commit650ba3d0ae989b24bfff6de89b57ed74e843b39a (patch)
tree67aeb3f2ec5738b10a31eee32000640b6fb25f69 /util
parent:bug: fix swcrc config: rewrite import -> require (diff)
downloadserver-650ba3d0ae989b24bfff6de89b57ed74e843b39a.tar.xz
:bug: fix types + swcrc configs
Diffstat (limited to 'util')
-rw-r--r--util/.swcrc8
-rw-r--r--util/package.json4
2 files changed, 9 insertions, 3 deletions
diff --git a/util/.swcrc b/util/.swcrc
index 9a89b49d..a723d37f 100644
--- a/util/.swcrc
+++ b/util/.swcrc
@@ -7,6 +7,12 @@
 			"syntax": "typescript",
 			"decorators": true
 		},
-		"target": "es2021"
+		"target": "es2021",
+		"transform": {
+			"legacyDecorator": true,
+			"decoratorMetadata": true
+		},
+		"keepClassNames": true,
+		"loose": true
 	}
 }
diff --git a/util/package.json b/util/package.json
index 50049e23..640d8926 100644
--- a/util/package.json
+++ b/util/package.json
@@ -3,12 +3,12 @@
 	"version": "1.0.0",
 	"description": "Utility functions for the all server repositories",
 	"main": "dist/index.js",
-	"types": "dist/index.d.ts",
+	"types": "src/index.ts",
 	"scripts": {
 		"start": "npm run build && node dist/",
 		"test": "npm run build && jest",
 		"postinstall": "npm run build",
-		"build": "swc src --out-dir dist"
+		"build": "tsc -b ."
 	},
 	"repository": {
 		"type": "git",