Socket
Socket
Sign inDemoInstall

unplugin-vue-components

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-vue-components

Components auto importing for Vue


Version published
Maintainers
2
Created

What is unplugin-vue-components?

unplugin-vue-components is a plugin for Vue.js that automatically imports Vue components on demand. It helps to reduce the boilerplate code by eliminating the need to manually import components in your Vue files. This plugin supports various component libraries and can be configured to work with custom components as well.

What are unplugin-vue-components's main functionalities?

Automatic Component Import

This feature allows you to automatically import Vue components without having to manually import them in each file. The plugin scans your project and imports the components as needed.

module.exports = {
  plugins: [
    require('unplugin-vue-components/webpack')({
      /* options */
    })
  ]
}

Support for Multiple Component Libraries

This feature allows you to use components from multiple libraries like Element Plus, Vant, etc., without manually importing them. The plugin provides resolvers for various popular libraries.

module.exports = {
  plugins: [
    require('unplugin-vue-components/webpack')({
      resolvers: [
        require('unplugin-vue-components/resolvers').ElementPlusResolver(),
        require('unplugin-vue-components/resolvers').VantResolver()
      ]
    })
  ]
}

Custom Component Directories

You can configure the plugin to automatically import components from custom directories. This is useful for organizing your components in a way that suits your project structure.

module.exports = {
  plugins: [
    require('unplugin-vue-components/webpack')({
      dirs: ['src/components', 'src/custom-components']
    })
  ]
}

Other packages similar to unplugin-vue-components

FAQs

Package last updated on 10 Apr 2022

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc