Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowJs option in tsconfig should be suggested to be false #6509

Closed
yang opened this issue Feb 24, 2019 · 4 comments
Closed

allowJs option in tsconfig should be suggested to be false #6509

yang opened this issue Feb 24, 2019 · 4 comments
Labels

Comments

@yang
Copy link

yang commented Feb 24, 2019

Currently, CRA suggests allowJs in tsconfig to be true. But, together with isolatedModules, this causes problems whenever there are .js files in the codebase. Specifically it causes microsoft/TypeScript#15230: "Cannot compile namespaces when the '--isolatedModules' flag is provided."

.js files can be introduced naturally a number of ways, e.g. by following instructions to add setupTests.js, setupProxy.js, etc., or by tools that generate .js files (e.g. protobuf, pegjs, etc.).

I think this is not needed because TS is only used for typechecking and not transpilation. Babel and webpack together already make sure to include any imported/required .js files in the output bundle.

@stale
Copy link

stale bot commented Mar 26, 2019

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.

@stale stale bot added the stale label Mar 26, 2019
@yang
Copy link
Author

yang commented Mar 26, 2019

This is still an open issue.

@stale stale bot removed the stale label Mar 26, 2019
@stale
Copy link

stale bot commented Apr 25, 2019

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.

@stale stale bot added the stale label Apr 25, 2019
@stale
Copy link

stale bot commented Apr 30, 2019

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Apr 30, 2019
@lock lock bot locked and limited conversation to collaborators May 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant