mirror of
https://github.com/zhigang1992/hasura-backend-plus.git
synced 2026-01-13 09:10:23 +08:00
* fix: when running on dev mode, use aliases in src/ and not in dist/. Update package.json accordingly
TS aliases are managed by tsconfig.json, whereas JS aliases are managed by the module-alias package.
They conflict if ts-node evaluates require('module-alias/register')
fix #283
* fix: correct the start command
resolveJsonModule: true is required in tsconfig.json because of the version endpoint. As
package.json is required to run HBP, tsc dist compilation ends up in creating a dist/package.json
file, but also dist/src folder. As a consequence, the start.js file path is not dist/start.js but
dist/src/start.js. The start script has been corrected in package.json, but IMO I feel this dist/src
folder is a bit ugly
* fix: fix the start script: stopped importing package.json in the code to fetch the version
instead, use the standard env var to get the package version
23 lines
524 B
JSON
23 lines
524 B
JSON
{
|
|
"exclude": ["node_modules", "**/*.spec.ts", "*.js"],
|
|
"include": ["src/**/*"],
|
|
"compilerOptions": {
|
|
"lib": ["dom", "es2020"],
|
|
"paths": {
|
|
"*": ["src/types/*"],
|
|
"@shared/*": ["src/shared/*"],
|
|
"@test/*": ["src/test/*"]
|
|
},
|
|
"module": "commonjs",
|
|
"outDir": "dist",
|
|
"strict": true,
|
|
"target": "es2019",
|
|
"baseUrl": ".",
|
|
"noUnusedLocals": true,
|
|
"esModuleInterop": true,
|
|
"moduleResolution": "node",
|
|
"strictNullChecks": true,
|
|
"resolveJsonModule": false
|
|
}
|
|
}
|