Skip to content

Instantly share code, notes, and snippets.

@petekp petekp/tsconfig.json
Created Mar 14, 2019

Embed
What would you like to do?
tsconfig.json for npm react component lib
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"baseUrl": "src",
"declaration": true,
"jsx": "react",
"module": "commonjs",
"moduleResolution": "node",
"noUnusedLocals": true,
"outDir": "dist",
"sourceMap": true,
"strict": true,
"target": "esnext",
}
}
@petekp

This comment has been minimized.

Copy link
Owner Author

commented Mar 14, 2019

To generate types for your components, you'll want to create a new npm script (e.g. build:types) that runs the typescript compiler with these flags: tsc --declaration --emitDeclarationOnly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.