Skip to content

Instantly share code, notes, and snippets.

@NewteqDeveloper
Created May 23, 2019 08:24
Show Gist options
  • Save NewteqDeveloper/c3565205d3a1a25a9357fe561c6f5392 to your computer and use it in GitHub Desktop.
Save NewteqDeveloper/c3565205d3a1a25a9357fe561c6f5392 to your computer and use it in GitHub Desktop.
This is a template for tsconfig that I've found useful over my time developing angular projects
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"paths": {
/*
these paths are defined like this to make it easier to reference the different files
basically, instead of using full relative paths from the feature modules if you want
to import something from the core module you can simply do
import { ClassName } from '@core/location'
instead of having to do
import { ClassName } from '../../core/location' (or the equivalent relative path)
This referencing of paths has been extremely helpful in the past
*/
"@environments/*": ["src/environments/*"],
"@core/*": ["src/app/@core/*"],
"@shared/*": ["src/app/@shared/*"],
"@featureModule/*": ["src/app/featureModule/*"],
},
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment