https://github.com/vite-plugin/vite-plugin-multiple
Allow multiple Vite to run simultaneously.
https://github.com/vite-plugin/vite-plugin-multiple
config multiple vite vite-plugin
Last synced: 11 months ago
JSON representation
Allow multiple Vite to run simultaneously.
- Host: GitHub
- URL: https://github.com/vite-plugin/vite-plugin-multiple
- Owner: vite-plugin
- License: mit
- Created: 2023-01-16T01:54:57.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-25T19:09:24.000Z (about 2 years ago)
- Last Synced: 2025-04-19T04:41:21.598Z (11 months ago)
- Topics: config, multiple, vite, vite-plugin
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 18
- Watchers: 0
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# vite-plugin-multiple
Allow multiple Vite to run simultaneously.
[](https://npmjs.com/package/vite-plugin-multiple)
[](https://npmjs.com/package/vite-plugin-multiple)
## Install
```sh
npm i -D vite-plugin-multiple
```
## Usage
```js
import multiple from 'vite-plugin-multiple'
export default {
plugins: [
multiple([
{
name: 'foo',
config: 'vite.foo.config.mjs',
},
{
name: 'bar',
config: 'vite.bar.config.mjs',
},
]),
],
}
```
**`vite serve`**
- `http://localhost:5173` access to the **main** app
- `http://localhost:5174` access to the **foo** app
- `http://localhost:5175` access to the **bar** app
**`vite build`**
- `dist` **main** app
- `dist/foo` **foo** app
- `dist/bar` **bar** app
## API (Define)
```ts
multiple(
apps: {
/**
* Human friendly name of your entry point.
*/
name: string
/**
* Vite config file path.
*/
config: string
/**
* Explicitly specify the run command.
*/
command?: 'build' | 'serve'
}[],
options: {
/**
* Called when all builds are complete.
*/
callback?: () => void,
} = {},
)
```