vite-plugins
is a collection of custom plugins designed to enhance the functionality of the Vite build tool.
中文 | English
Functionality: Combine multiple files into a main file and export the contents of these files according to the configuration. Supports named export, default export, and no export modes.
Functionality: Copy files to a specified directory.
Functionality: Exclude specified module dependencies, supports development runtime and bundled files.
Functionality: Display the order and count of Vite hook function calls.
Functionality: Bundle CSS code into a single JS file.
Functionality: Configure local mock data.
Functionality: Proxy online resources to local for debugging with Chrome extension XSwitch.
Functionality: Split batch imports from a source module into individual file imports.
Install project dependencies using npm run deps
:
npm run deps
The project includes several npm scripts for different development and build tasks:
deps
: Clean and install dependencies.clean
: Cleannode_modules
directories.eslint
: Run ESLint for code formatting and linting.build:packages
: Build all plugin packages in parallel.build:examples
: Build all example projects in parallel.prepare
: Install Husky hooks.docs
: Generate project documentation.
vite-plugins/
├── examples/ # Example projects
├── packages/ # Plugin packages
│ ├── vite-plugin-combine/
│ ├── vite-plugin-cp/
│ ├── vite-plugin-external/
│ ├── vite-plugin-hook-use/
│ ├── vite-plugin-include-css/
│ ├── vite-plugin-mock-data/
│ ├── vite-plugin-reverse-proxy/
│ └── vite-plugin-separate-importer/
├── .eslintignore # ESLint ignore file
├── .eslintrc.js # ESLint configuration file
├── .husky/ # Husky configuration directory
├── .lintstagedrc.js # lint-staged configuration file
├── package.json # Project configuration file
├── README.md # English README
├── README_zh-CN.md # Chinese README
└── typedoc.json # TypeDoc configuration file
The project includes several example projects demonstrating how to use these plugins:
Contributions are welcome! Please ensure your code meets the project standards and passes all test cases.
MIT