From 72af8dc71987fa41bd35c3949238ebf863159817 Mon Sep 17 00:00:00 2001 From: The Arcane Brony Date: Wed, 6 Oct 2021 18:20:22 +0200 Subject: Compiler test --- webrtc/.swcrc | 9 +++++++++ webrtc/tsconfig.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 webrtc/.swcrc (limited to 'webrtc') diff --git a/webrtc/.swcrc b/webrtc/.swcrc new file mode 100644 index 00000000..f04801b8 --- /dev/null +++ b/webrtc/.swcrc @@ -0,0 +1,9 @@ +{ + "jsc": { + "parser": { + "syntax": "typescript", + "decorators": true + }, + "target": "es2021" + } +} \ No newline at end of file diff --git a/webrtc/tsconfig.json b/webrtc/tsconfig.json index 6bf2e6b7..70631fca 100644 --- a/webrtc/tsconfig.json +++ b/webrtc/tsconfig.json @@ -7,7 +7,7 @@ // "incremental": true, /* Enable incremental compilation */ "target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, - "lib": ["ES2020"] /* Specify library files to be included in the compilation. */, + "lib": ["ES2021"] /* Specify library files to be included in the compilation. */, "allowJs": true /* Allow javascript files to be compiled. */, "checkJs": true /* Report errors in .js files. */, // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ -- cgit 1.5.1 From 95bb148cfa7b12588d4cd45754e14e2039bdd9a7 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Thu, 7 Oct 2021 09:59:04 +0200 Subject: :bug: fix swcrc config: rewrite import -> require --- api/.swcrc | 19 +++++++++++-------- api/package.json | 2 +- bundle/.swcrc | 47 +++++++++++++++++++++++++---------------------- cdn/.swcrc | 19 +++++++++++-------- dashboard/.swcrc | 23 ----------------------- gateway/.swcrc | 19 +++++++++++-------- rtc/.swcrc | 9 --------- util/.swcrc | 19 +++++++++++-------- webrtc/.swcrc | 19 +++++++++++-------- 9 files changed, 81 insertions(+), 95 deletions(-) delete mode 100644 dashboard/.swcrc delete mode 100644 rtc/.swcrc (limited to 'webrtc') 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" + } +} -- cgit 1.5.1