nuxt-tsconfig-stub

0.0.2 • Public • Published

nuxt-tsconfig-stub

NPM version

Stub Nuxt's generated tsconfig.json at installation.

Motivation

Nuxt handles the tsconfig under .nuxt/tsconfig.json dynamically for you. And commonly your root tsconfig.json is essential a redirection like:

{
  "extends": "./.nuxt/tsconfig.json"
}

The directory .nuxt is excluded from the source control. Meaning in CI environment, the .nuxt/tsconfig.json does not exist on the initial check out, which might causing some TypeScript related tools fail. You can run nuxi prepare asking Nuxt to generate one for you, or any Nuxt commands like nuxi dev nuxi build will also generate the file for you.

This package is to solve a niche problem that you might want to use the tsconfig before running Nuxt commands. This uses postinstall to create an empty JSON file at .nuxt/tsconfig.json if it does not exist already.

Install

npm i nuxt-tsconfig-stub -D

That's it.

Sponsors

License

MIT License © 2022 Anthony Fu

Readme

Keywords

Package Sidebar

Install

npm i nuxt-tsconfig-stub

Weekly Downloads

56

Version

0.0.2

License

MIT

Unpacked Size

4.42 kB

Total Files

4

Last publish

Collaborators

  • antfu