-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
21 lines (20 loc) · 1.19 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"compilerOptions": {
// Default
"target": "es5",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"jsx": "react",
"module": "ESNext",
"declaration": true, // want our library to be usable by anyone (js or ts), if we include .d.ts files, it provides those types for people using typescript but doesn't prevent js user from using components from our library
"declarationDir": "types",
"sourceMap": true, // for debugging
"outDir": "dist", // output directory called "dist" folder - where we will bundle our library
"moduleResolution": "node", // node module resolution algorithms. node looks for modules. First looks in node modules, if not then next place etc.
"allowSyntheticDefaultImports": true, // if you are not exporting something by default, then it assumes you are
"emitDeclarationOnly": true // rollup - tool we will use to bundle our js files. We don't need typescript to bundle js files, we can use typescript to bundle the type files in our library and let rollup take care of js files
// using rollup rather than webpack - rollup is suited for bundling libraries together
}
}