1.1.0 • Published 5 years ago
@oleg-ch/tsconfig v1.1.0
@oleg-ch/tsconfig
Common typescript config.
All output options are disabled (declaration: false, noEmit: true).
Strict type checks are enabled (e.g noImplicitAny, etc).
Additional configuration may be required for using it with Webpack or Babel.
Installation
yarn add -D @oleg-ch/tsconfigUsage
Extend your tsconfig.json:
{
"extends": "@oleg-ch/tsconfig"
}Babel
Add @babel/preset-typescript to your babel.config.json.
Add --extensions ".js,.ts,.tsx" flag, if you use Babel CLI.
Webpack
Use @babel/preset-typescript as described above.
Configure babel-loader's test regular expression to include ts and tsx files.
You can also use ts-loader.
yarn add -D ts-loaderCheck the example of using ts-loader with babel-loader.
WARNING Turn off noEmit when using ts-loader with @oleg-ch/tsconfig:
{
"extends": "@oleg-ch/tsconfig",
"compilerOptions": {
"noEmit": false
}
}For more info check ts compiler options
1.1.0
5 years ago