🐛 fix swcrc config: rewrite import -> require

This commit is contained in:
Flam3rboy 2021-10-07 09:59:04 +02:00
parent 7db9086dd0
commit b5905c1bba
9 changed files with 81 additions and 95 deletions

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",

View File

@ -10,7 +10,7 @@
"test": "npm run build && npm run test:only", "test": "npm run build && npm run test:only",
"test:watch": "jest --watch", "test:watch": "jest --watch",
"start": "npm run build && node dist/start", "start": "npm run build && node dist/start",
"build": "npx tsc -b .", "build": "swc src --out-dir dist",
"build-docker": "tsc -p tsconfig-docker.json", "build-docker": "tsc -p tsconfig-docker.json",
"dev": "tsnd --respawn src/start.ts", "dev": "tsnd --respawn src/start.ts",
"patch": "ts-patch install -s && npx patch-package", "patch": "ts-patch install -s && npx patch-package",

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "ecmascript", "syntax": "ecmascript",

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",

View File

@ -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
}
}

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",

View File

@ -1,9 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"decorators": true
},
"target": "es2021"
}
}

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",

View File

@ -1,4 +1,7 @@
{ {
"module": {
"type": "commonjs"
},
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",