Allow custom extensions (.ts .tsx .jsx)
See original GitHub issuePretty interesting proposal here: https://github.com/zeit/next.js/pull/2250/files#diff-0f2f34c098f5954f99483c9bd61e439dR51. We could reutilize this as a custom key in next.config.js
to allow any file extension. Which also resolves the .jsx
extension support 👍
talked about it with @arunoda 👌
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:31 (7 by maintainers)
Top Results From Across the Web
80 - Stack Overflow
JSX not allowed in files with extension '.tsx'eslint(react/jsx-filename-extension) · Ask Question. Asked 3 years, 8 months ago.
Read more >Documentation - JSX - TypeScript
Name your files with a .tsx extension; Enable the jsx option ... (e.g. a div or span in a DOM environment) or to...
Read more >When To Use .ts And .tsx File Extensions - Andrew Hansen
When To Use .ts And .tsx File Extensions ... The only alternative was to use the non-JSX syntax for React: React.createElement .
Read more >Custom Page Extensions - next.config.js
Extend the default page extensions used by Next.js when resolving pages in the pages directory.
Read more >ts-node - npm
In many cases, setting NODE_OPTIONS will enable ts-node within other ... by registering hooks for .ts , .tsx , .js , and/or .jsx...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @arunoda @timneutkens @nkzawa @rauchg , a friendly reminder that there is on open PR (https://github.com/zeit/next.js/pull/2699) to close this “help wanted” labeled ticket. Though it is labeled also as “nice to have”, not being able to use TypeScript prevents my company and two other open source projects to switch over to next.js.
It may be that you guys are not in a particular need for TypeScript, but searching this repository for typescript revels 31 related tickets alone. Excluding any jsx and extension tickets.
Me, including a broad band of the developer community, right up refuses to implement un-typed code. Especially if it is run universally on two or more infrastructures (server, browser, ios, android etc).
So I urge you guys to promote this ticket up in your priority chain and take a look at the sitting contribution. A few people have offered help already. Leveling off ecmascript variants (jsx, tsx, cl, etc.) is simply not a gimic. After that, next.js will defiantly become a go-to SSR solution.
Thank you for the great work you have put into this project. I am excited what comes next to next.js — all that beyond this corner issue.
Best Dino
Any update?