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

nuxt.config.ts is not working? #6261

Closed
tanakaworld opened this issue Aug 21, 2019 — with CMTY · 4 comments
Closed

nuxt.config.ts is not working? #6261

tanakaworld opened this issue Aug 21, 2019 — with CMTY · 4 comments

Comments

Copy link

@tanakaworld tanakaworld commented Aug 21, 2019 — with CMTY

Version

v2.9.1

Reproduction link

tanakaworld/verify-2.9.1@d78cbc6

Steps to reproduce

For instance, srcDir is not working if file name is nuxt.config.ts.
ref: tanakaworld/verify-2.9.1@d78cbc6

Screen Shot 2019-08-21 at 14.25.42.png
Screen Shot 2019-08-21 at 14.26.06.png

After rename to nuxt.config.js, it will work correctlly.

Screen Shot 2019-08-21 at 14.24.55.png

What is expected ?

nuxt.config.ts should be working.

What is actually happening?

nuxt.config.ts should be working.

This bug report is available on Nuxt community (#c9664)
@cmty cmty bot added the cmty:bug-report label Aug 21, 2019
@iliyaZelenko

This comment has been minimized.

Copy link
Contributor

@iliyaZelenko iliyaZelenko commented Aug 21, 2019

I saw that a migration guide appeared, should help: https://typescript.nuxtjs.org/migration.html

@iliyaZelenko

This comment has been minimized.

Copy link
Contributor

@iliyaZelenko iliyaZelenko commented Aug 21, 2019

I had the same problem, now everything works.

You can take types for a config from:

import { Configuration } from '@nuxt/types/config'

const config: Configuration = {

If your project is using TypeScript runtime (nuxt.config.ts), then do this.

@pimlie pimlie added the typescript label Aug 21, 2019
@tanakaworld

This comment has been minimized.

Copy link
Author

@tanakaworld tanakaworld commented Aug 21, 2019

According to TypeScript runtime, nuxt.config.ts works fine by using nuxt-ts instead of nuxt.

demo: tanakaworld/verify-2.9.1@263707d

Thanks!

@pksorensen

This comment has been minimized.

Copy link

@pksorensen pksorensen commented Aug 23, 2019

I just upgraded and also just changed my nuxt.config.ts to .js to fix compile.

I consider myself a rather smart guy, but I failed at reading https://typescript.nuxtjs.org/migration.html and make my config.ts file work as it used to.

I will try see if anything in this issue helps me get it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.