Closed manniL closed 5 years ago
I commited a draft on my fork : https://github.com/kevinmarrec/nuxt.js/commit/20683a6de7af4c789ee0cd953f6821ae8b925ae0
I think my way to setup a typescript
Nuxt Config option is the best solution.
Cause with other solutions it will instantly break every project using a TypeScript Module (from npm or local one). Cause there will be both Babel and TsLoader doing things.
With the typescript
option, TS users will be able to either have their custom TS module or enable built-in Nuxt support with typecript: true
.
EDIT : The migration guide will only about removing the TS module and add typecript: true
in nuxt.config.js
If everyone like this solution, we can discuss of the option name, if typescript
is not enough relevant.
the interoperability / -> not breaking / allowing custom setup is a good point indeed!
Nice blog post to read if you have some time to spend to understand why should we use Babel for the Nuxt TypeScript Support : https://iamturns.com/typescript-babel
We'll need to copy this link or explain the caveats of https://babeljs.io/docs/en/next/babel-plugin-transform-typescript in Nuxt documentation.
please please use discord or nuxt issues for general discussions instead of RFC 🙏 A normal RFC process should be in form of a detailed writedown about changes, more discussions and implemented by one or more PRs referencing to the issue. readme
@pi0 Sorry !
@pi0 I thought we could use it to clearly state how we want to implement the TS support :thinking:
@pi0 I'm a bit confused by your comment, just wanting clarification. In this thread it feels we are discussing an RFC which hasn't been formalized. You seemed to suggest Discord/NUXT issues as more appropriate? I do think think the RFC thread is too bare to be a starting point currently but wouldn't this conversation -- which has both momentum and high value (IMO) -- be better served working off of an RFC? That's certainly how we'd have done it in the Ember community (although the bare bones RFC would not have been allowed). I think whomever started the RFC ... @manniL is that you? ... should take a next step to formalize the RFC too but I'd strongly prefer if this didn't slow down the movement that this thread is already generating.
I'm new to NUXT so please take my comments only as exploratory, I expect I'll be bumping into walls a bit to start.
placeholder
related PRs: https://github.com/nuxt/nuxt.js/pull/4406