setup to emit esmodules instead of commonjs
This commit is contained in:
@@ -3,10 +3,11 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"prerun:dev": "npm install && rimraf dist/*",
|
"prerun:dev": "npm install && rimraf dist/*",
|
||||||
"run:prod": "node --inspect=0.0.0.0:9229 dist/app.js",
|
"run:prod": "node --inspect=0.0.0.0:9229 --es-module-specifier-resolution=node dist/app.js",
|
||||||
"run:dev": "tsc-watch --onSuccess \"npm run run:prod\" --onFailure \"echo WHOOPS! Server compilation failed\""
|
"run:dev": "tsc-watch --onSuccess \"npm run run:prod\" --onFailure \"echo WHOOPS! Server compilation failed\""
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"module": "commonjs",
|
"module": "ES2022",
|
||||||
"target": "es2015",
|
"target": "ES2022",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2017"
|
"ES2022"
|
||||||
],
|
],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "Node"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user