Relatives import are quite ugly and reduces readability, but hard to say that Typescript handles it very well for compilation time, but nothing for runtime. That's why I had to add tsc-alias to the build script. Please see this issue for more details. https://github.com/Microsoft/TypeScript/issues/15479 Furthermore, some configuration was needed for Jest to work well.
14 lines
247 B
JSON
14 lines
247 B
JSON
{
|
|
"extends": "@openfun/typescript-configs/node.json",
|
|
"include": [
|
|
"./src/**/*"
|
|
],
|
|
"compilerOptions": {
|
|
"baseUrl": "./src/bin",
|
|
"paths": {
|
|
"*": ["*"]
|
|
},
|
|
"resolveJsonModule": true,
|
|
"outDir": "./dist/bin",
|
|
}
|
|
} |