Create-nuxt-app: Typescript support

Created on 22 Jan 2018  ·  34Comments  ·  Source: nuxt/create-nuxt-app

It would be nice to have typescript/tslint support as part of the configuration

This feature request is available on Nuxt.js community (#c16)
enhancement

Most helpful comment

@joshua1 @AndrewBogdanovTSS @Atinux I will be working on an enhanced Typescript starter as soon as possible, there are few problems with decorators that need to be fixed too 👍

All 34 comments

I suggest a refinement of tyoescript-template containing vuex-typex and cleaned up dependencies.

Hmm. I didn't read it all and misunderstood the enhancement request.

It would be great to incorporate existing nuxt-community/typescript-template inside create-nuxt-app
As far as I understand the related issue was already logged by @pkej

Indeed, we need to finish @nuxtjs/typescript so we will able to add it inside create-nuxt-app.

cc @breakingrobot

@joshua1 @AndrewBogdanovTSS @Atinux I will be working on an enhanced Typescript starter as soon as possible, there are few problems with decorators that need to be fixed too 👍

I'm currently exploring Nuxt for a new project and was wondering if there was any update on TS support? Thanks!

@karellm not a lot, we still have a long way to go with TS. In case you plan to build full-featured heavy SPA - TS currently is not the way to go since you will face quite a lot of bugs in Nuxt dependencies, most of which weren't even build with TS in mind, but again, that's just my experience.

@AndrewBogdanovTSS Thanks for sharing. I wanted to give TS a spin but I guess it will wait.

Does the create-nuxt-app support typescript now?

can use this package (https://github.com/wagerfield/nuxt-typescript) to configure the typescript, but may I know any support for typescript with express and nuxt?

I am currently working on adding features choice like in vue cli 3 (typescript, pwa, tests etc...). Though it will probably take some time to do them all, typescript will probably be done in a few days.

Please tell me if someone else is already working on it.

@sascha245 thanks for the work! I was wondering how to implement typescript with nuxt+express server (not a middleware), but only on server side. I am talking about something like this (https://github.com/pronist/nuxt-express-typescript-template), but since I am very bad with build tools like webpack and backpack, I am struggling to figure it out. (the example below looks outdated and I am hesitant to use this one). Maybe you will look into the issue and add the feature like this? I mean typescript support for the custom server. Thanks in advance!

Status update?

@JohnatanNorman Did you found any solution?

@francoism90 General TS support is coming really soon.
After that we can talk about a CNA integration

PS: PR's are appreciated!

@manniL Is it already possible to test and report bugs, if any? I'm still facing issues with serverMiddleware where imports doesn't seem to work, hope this will work with the new TS support.

Thanks for the hard work!

@francoism90 It is, yes. Feel free to join our Discord for easier feedback. Besides that, you can submit issues as usual.
A TS example is available at https://github.com/nuxt-community/hackernews-nuxt-ts/

I wrote this sample that uses typescript for express and nuxt
https://gitlab.com/hosweetim/timx-site

@riddla and i created a typescript template, too. Enjoy!
https://github.com/christophwolff/nuxt-typescript-template

Will typescript support land on create-nuxt-app?

First of all, Kudos to Nuxt team for Nuxt 2.4.0 and TypeScript integration! Being new to Nuxt, I tried a Nuxt+TypeScript project thanks for Hackernews-nuxt-ts and this helloworld

Nightmare started with testing, especially with Babel 6 -> 7 / Jest 23.6.0 -> 24.1.0 especially with [ts] cannot find module ... [2307] in testing files, please check this issue.


  • Question 1: Will the create-nuxt-app with TypeScript starts at Jest 24+?
  • Question 2: Apart from adding TypeScript specific dependencies, the only point would be fixing the point mentioned above by updating @nuxt/typescript/tsconfig and adding a ts-shim.d.ts. But I don't know where to comment it 😆
  • Question 3: How about migration of existing projects? I guess it should be handled in nuxt/docs?

Should use ESLint instead of TSLint: https://cmty.app/nuxt/nuxt.js/issues/c8742

@envision, I second that. We just switched from TSLint to ESLint within our nuxt project. The current ESLint config can be found over at https://gist.github.com/riddla/6e892375ff373cdc457bbf93da39ef58.

Nuxt 2.5 is out with typescript improvements! Is it time to get typescript support ?

It's been 2 months without an update here. When can we realistically expect TS as an option with create-nuxt-app?

Ping

I can't promise anything, but now that https://github.com/nuxt/nuxt.js/pull/5858 is through, we could tackle that issue :+1:

Nuxt 2.9 is out. I think the community needs this typescript option asap. Let's do it! 🎉

FYI for those interested, Next.js now supports TypeScript by default, no plugins or config needed:

I just stumbled upon nuxt-app-ts. My problem is solved. Just try:

yarn create nuxt-app-ts you_app_name

or

npx create-nuxt-app-ts <my-project>

or

npm init nuxt-app-ts <my-project>

@coolsam726 unofficial library, with old version of nuxt (last updated 5 months ago) it's not the solution.

  "dependencies": {
    "nuxt": "^2.6.2",
    "vuetify": "^1.5.2"
  },

another pr being worked XD tracking #328 might be helpful

Implemented in #328

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sandro-git picture sandro-git  ·  4Comments

OndrejCibulka picture OndrejCibulka  ·  6Comments

himanshu64 picture himanshu64  ·  6Comments

lloydjatkinson picture lloydjatkinson  ·  3Comments

tabishiqbal picture tabishiqbal  ·  5Comments