Set es2022 globally but force CommonJS when using ts-node for scripts

This commit is contained in:
Johannes Marbach 2023-11-19 20:38:51 +01:00
parent f46cdd0757
commit 37c1c4e8ae
2 changed files with 6 additions and 3 deletions

View file

@ -43,7 +43,7 @@
"build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js",
"build:bundle": "webpack --progress --mode production",
"build:bundle-stats": "webpack --progress --mode production --json > webpack-stats.json",
"build:module_system": "tsc --project ./tsconfig.module_system.json && node ./lib/module_system/scripts/install.js",
"build:module_system": "ts-node --project ./tsconfig.module_system.json module_system/scripts/install.ts",
"dist": "scripts/package.sh",
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n modules,res,jitsi \"yarn build:module_system\" \"yarn build:res\" \"yarn build:jitsi\" && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js --https\"",

View file

@ -4,7 +4,7 @@
"emitDecoratorMetadata": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"module": "commonjs",
"module": "es2022",
"moduleResolution": "node",
"target": "es2016",
"noUnusedLocals": true,
@ -28,6 +28,9 @@
"./scripts/*.ts"
],
"ts-node": {
"files": true
"files": true,
"moduleTypes": {
"*": "cjs"
}
}
}