You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I maintain a react component library, written in TypeScript. Our components use sass, and consequently we build the library using babel rather than tsc, and use tsc for generating type declarations with emitDeclarationOnly: true.
We do want to continue using CRA, however every time we touch react-scripts it addsnoEmit: true to our .tsconfig which is incompatible with emitDeclarationOnly. Please note that these two keywords are incompatible with each other, settings noEmit: false is not a solution, and this is overwritten by react-scripts to true at any rate.
This makes CRA largely unusable for maintaining a TypeScript component library unfortunately.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Describe the bug
I maintain a react component library, written in TypeScript. Our components use sass, and consequently we build the library using babel rather than tsc, and use tsc for generating type declarations with
emitDeclarationOnly: true
.We do want to continue using CRA, however every time we touch react-scripts it adds
noEmit: true
to our .tsconfig which is incompatible withemitDeclarationOnly
. Please note that these two keywords are incompatible with each other, settingsnoEmit: false
is not a solution, and this is overwritten by react-scripts totrue
at any rate.This makes CRA largely unusable for maintaining a TypeScript component library unfortunately.
Originally posted as a discussion.
Did you try recovering your dependencies?
n/a
Which terms did you search for in User Guide?
n/a
Environment
n/a
Steps to reproduce
emitDeclarationOnly: true
in.tsconfig
.react-scripts
e.g.yarn test
Expected behavior
noEmit
should not be added ifemitDeclarationOnly
is present.Actual behavior
noEmit: true
is added to.tsconfig
, breaking the build.Reproducible demo
n/a
The text was updated successfully, but these errors were encountered: