question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript: Create nuxt.config.ts instead nuxt.config.js

See original GitHub issue

@nuxt/types package provides type definition for Nuxt configuration.

Configuration (Runtime) | Nuxt TypeScript

I think that project with TypeScript should use nuxt.config.ts instead nuxt.config.js.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
fabiofdsantoscommented, Apr 15, 2020

I also have these related errors:

  61:13  error  'config' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars
  61:21  error  'ctx' is defined but never used. Allowed unused args must match /^_/u     @typescript-eslint/no-unused-vars
2reactions
kevinmarreccommented, May 5, 2020

The following PR : https://github.com/nuxt/create-nuxt-app/pull/449 will do it and fix lint issues.

FYI : nuxt.config.ts is not mandatory for a Nuxt TypeScript project, as well as @nuxt/typecript-runtime being optional.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup - Nuxt TypeScript
Setup. Nuxt TypeScript Support mainly comes through a Nuxt module, ... you need to do is add @nuxt/typescript-build to your buildModules in nuxt.config.js....
Read more >
How to set up and code Nuxt.js apps fully in TypeScript
nuxt.config.js export default { buildModules: ['@nuxt/typescript-build'] }. Create the tsconfig.json file and add the following.
Read more >
TypeScript · Nuxt Concepts
This file contains the recommended basic TypeScript configuration for your project, including resolved aliases injected by Nuxt or modules you are using, ...
Read more >
Setup Typescript with NuxtJs - Sandro Maglione
1. Create a NuxtJs project. Run the init command to create a new Nuxt project (from here): · 2. Nuxt Typescript. You must...
Read more >
How to access config in nuxt.config.js in typescript file?
I try to access to config variables written in nuxt.config.js I set my env variables in privateRuntimeConfig instead of dotenv.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found