nuxt-tsconfig-stub

Stub Nuxt's generated tsconfig.json at installation
70,835 24
Install
npm install nuxt-tsconfig-stub
Latest Version:0.0.2
License:MIT
Last Updated:May 13, 2022
Links: GitHub  ·  npm
Maintainer: antfu

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

Related Packages

@scayle/storefront-nuxt

Nuxt integration for the SCAYLE Commerce Engine and Storefront API

152,903
kuranuxt

Look at the Nuxt 3 documentation to learn more.

871 0
nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511
dayjs-nuxt

Day.JS Module for Nuxt

1,986,864 126
@element-plus/nuxt

Element Plus module for Nuxt

830,141 176

Version History

Version Released License
0.0.2 MIT
0.0.1 MIT
0.0.0 MIT