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

feat: Add .tsx extension #1566

Closed
wants to merge 1 commit into from
Closed

feat: Add .tsx extension #1566

wants to merge 1 commit into from

Conversation

mixed
Copy link

@mixed mixed commented May 8, 2019

Expected behaviour

cross-env NODE_ENV=development nodemon --require ts-node/register -e ts,tsx index.ts

The following error occurs when executed as above.

/Users/hi/Sites/fe/node_modules/ts-node/src/index.ts:228
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:

Actual behaviour

There should be no error.

Steps to reproduce

It recently added a feature from 'V1.19.0'. Therefore, if the extension is ts, ts-node can be executed automatically and modified as follows.

cross-env NODE_ENV=development nodemon -e ts,tsx index.ts

Currently, I use ts/tsx with the project as follows. So in the case of tsx, I have to use register 'ts-node'.

cross-env NODE_ENV=development nodemon --require ts-node/register -e ts,tsx index.tsx

This feature is awkward to the user. I think both ts and tsx would be better run in ts-node. What do you think?

@remy
Copy link
Owner

remy commented May 8, 2019

The previous feature change actually caused issues to users (see the open issues), so I'm not sure about adding more cases to something that already has issues (or doesn't have clear work around).

I'd be happy to leave this PR open for a while and if there's significant +1 then it would seem there's a good user case.

@stale
Copy link

stale bot commented May 23, 2019

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label May 23, 2019
@stale stale bot closed this May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity for 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants