Framework - Express.js
Mark an Express.js source layer explicitly while composing its compiler behavior from the source role and Node runtime.
Why Use This Preset?
- Makes the Express.js framework choice visible in a standard Nova preset chain.
- Avoids copying Express-specific compiler settings that the framework does not require.
- Lets
role-sourceown declarations and emit whileruntime-nodeowns module resolution and libraries. - Leaves application-specific Express and Node types in the local TSConfig.
Usage
Add the preset after the essentials, strict, source-role, and Node-runtime layers.
tsconfig.json
{
"extends": [
"@cbnventures/nova/presets/tsconfig/dx-essentials.json",
"@cbnventures/nova/presets/tsconfig/dx-strict.json",
"@cbnventures/nova/presets/tsconfig/role-source.json",
"@cbnventures/nova/presets/tsconfig/runtime-node.json",
"@cbnventures/nova/presets/tsconfig/fw-expressjs.json"
],
"compilerOptions": {
"outDir": "./build",
"rootDir": "./src",
"types": [
"@types/node",
"@types/express"
]
},
"include": [
"./src/**/*"
],
"exclude": [
"./build/**",
"./node_modules/**"
]
}
What This Preset Configures
Express.js does not require compiler overrides beyond the Node runtime, so this preset intentionally supplies an empty compilerOptions object. It remains useful as an explicit, future-compatible framework layer.
The preceding runtime-node layer supplies lib, module, and moduleResolution. The preceding role-source layer supplies declaration and emit behavior.
Related
- Review the layering order in TSConfig Best Practices.
- See how presets compose end to end in the Presets Overview.