Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/components

Package Overview
Dependencies
Maintainers
5
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/components

Auto Import Components for Nuxt.js

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
177K
decreased by-0.12%
Maintainers
5
Weekly downloads
 
Created

What is @nuxt/components?

@nuxt/components is a Nuxt.js module that automatically imports your components, making it easier to manage and use components in your Nuxt.js applications. It scans your project for components and makes them available globally without the need for manual imports.

What are @nuxt/components's main functionalities?

Automatic Component Registration

By setting `components: true` in your Nuxt.js configuration, the @nuxt/components module will automatically scan your project for components and register them globally, eliminating the need for manual imports.

export default {
  components: true
}

Custom Directories

You can specify custom directories for your components and even add a prefix to avoid naming conflicts. This allows for better organization and modularity in your project.

export default {
  components: [
    '~/components',
    { path: '~/custom-components', prefix: 'Custom' }
  ]
}

Dynamic Imports

The module supports dynamic imports, which can help in code-splitting and optimizing the loading time of your application. You can configure the directories and file extensions to be dynamically imported.

export default {
  components: {
    dirs: [
      { path: '~/components', extensions: ['vue'], level: 1 }
    ]
  }
}

Other packages similar to @nuxt/components

FAQs

Package last updated on 16 Aug 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc