
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
volar-component-types
Advanced tools
A module that provides Volar types for auto-discovered components in Nuxt 2
A module that provides Volar types for auto-discovered components in Nuxt 2.
Nuxt 2, like Nuxt 3, auto-discovers components but unlike Nuxt 3, it doesn't automatically generate types for those components so Vue Language Tools (formerly Volar) is not able to type-check those unless they are explicitly imported (which defeats the purpose of auto-discovering). This module takes care of registering types for all auto-discovered components so that Volar is aware of those and can type-check them. Does that by generating a plain type definition file with extended types for GlobalComponents interface.
volar-component-types package:
# Npm
npm i -D volar-component-types
# Yarn
yarn add -D volar-component-types
buildModules in nuxt.config.js.
export default {
buildModules: [
'volar-component-types/nuxt',
],
}
tsconfig.json:
{
// other options...
"include": [
"./nuxt/types/components.d.ts",
"./nuxt.config.ts",
// Also make sure that all pages and components are included, for example:
"./pages/**/*",
"./components/**/*",
// etc...
],
"vueCompilerOptions": {
"target": 2.7,
"strictTemplates": true,
}
}
types array in tsconfing.json to augment Nuxt Config with module configuration types.
{
"compilerOptions": {
"types": [
"volar-component-types",
]
}
}
nuxt dev.FAQs
A module that provides Volar types for auto-discovered components in Nuxt 2
The npm package volar-component-types receives a total of 16 weekly downloads. As such, volar-component-types popularity was classified as not popular.
We found that volar-component-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.