Skip to content

Instantly share code, notes, and snippets.

@alexdisdier
Last active March 10, 2020 06:13
Show Gist options
  • Save alexdisdier/1be78e71c80c0c604b66cc0cc9b875ab to your computer and use it in GitHub Desktop.
Save alexdisdier/1be78e71c80c0c604b66cc0cc9b875ab to your computer and use it in GitHub Desktop.
TS configuration for building a library
{
"compilerOptions": {
"target": "es5",
"lib": ["es2015", "dom"],
"outDir": "lib",
"jsx": "react",
"module": "commonjs",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"strict": true,
"noImplicitAny": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": ["src"],
"exclude": [
"node_modules",
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.tsx",
"./src/setupTests.ts"
],
"files": ["./src/index.ts"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment