Vite Auto Import Vue is a slim Vite plugin that automatically imports Vue components, layouts, and composables as they are referenced in your code. 🚀
npm install vite-auto-import-vue --save-dev
import vitePluginVueAutoImport from 'vite-auto-import-vue';
export default {
plugins: [
vitePluginVueAutoImport({
// Options here
}),
],
};
base
: The base path used to resolve component and composables. 📁components
: An array of directories where your components are located. 📁layouts
: The directory where your layout components are located. 📁composables
: An array of directories where your composables are located. 📁srcAlias
: The alias for yoursrc
directory. 📁verbose
: Whether or not to output logging information. 📢
- Vite: a build tool that serves as a development server with fast builds.
- Vue.js: a popular JavaScript framework for building user interfaces.
- unplugin-auto-import/vite: a Vite plugin that automatically imports components or any other modules on the fly while you are coding.
- unplugin-vue-components/vite: a Vite plugin that provides auto import and on-demand registration of Vue single-file components as well as their dependencies.
By using these technologies, the `vite-auto-import-vue` plugin is able to provide a seamless and efficient experience for importing and using Vue components and other modules in your Vite projects.
Contributions are welcome! Please follow these steps:
- Fork this repository.
- Create a new branch with your changes:
git checkout -b my-feature-branch
- Commit your changes:
git commit -am 'Added some feature' :sparkles:
- Push to the branch:
git push origin my-feature-branch
- Submit a pull request. 🚀
- Add support for TypeScript. ⚙️
- Implement a better way of handling layout and composables resolution. 🔧
- Add more resolvers to support additional types of imports. ⚙️