setup to emit esmodules instead of commonjs

main
Fionn 2 years ago
parent 57db5860e3
commit 05b5e14bfd

@ -3,10 +3,11 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"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\""
},
"keywords": [],
@ -30,4 +31,4 @@
"tsc-watch": "^5.0.3",
"typescript": "^4.7.4"
}
}
}

@ -2,10 +2,10 @@
"compileOnSave": false,
"compilerOptions": {
"outDir": "dist",
"module": "commonjs",
"target": "es2015",
"module": "ES2022",
"target": "ES2022",
"lib": [
"es2017"
"ES2022"
],
"sourceMap": true,
"strictNullChecks": true,
@ -13,6 +13,7 @@
"preserveConstEnums": true,
"removeComments": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true
"esModuleInterop": true,
"moduleResolution": "Node"
}
}
Loading…
Cancel
Save