I am creating a component-library and using tsc to output a 1:1 of my tsx files to .js files. However I cannot get this to working:
comand
...
"ts": "rm -rf dist && yarn tsc --build tsconfig.json",
...
tsconfig.json
{
"compilerOptions": {
"baseUrl": "./src",
"target": "es6",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"rootDirs": [
"src",
"stories",
"config"
],
"rootDir": "src",
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "react-jsx",
"declaration": true,
"emitDeclarationOnly": true,
"isolatedModules": true,
"outDir": "dist",
},
"include": [
"src"
],
"exclude": [
"**/*.spec.ts",
"**/*.test.tsx",
"**/*.stories.js",
"node_modules",
"src/test-utils",
"dist",
"docs",
"src/setupTests.js"
]
}
output
dist
dist/components
dist/components/Link
dist/components/Link/index.d.ts
dist/components/Link/Link.d.ts
dist/components/Text
dist/components/Text/index.d.ts
dist/components/Text/Text.d.ts
dist/components/index.d.ts
emitDeclarationOnly
set totrue
– Walhalla"noEmit": true
– Hae