Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vite-plugin/vite-plugin-multiple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

14 Commits

Repository files navigation

vite-plugin-multiple

Allow multiple Vite to run simultaneously.

NPM version NPM Downloads

Install

npm i -D vite-plugin-multiple

Usage

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)

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,
 } = {},
)

About

Allow multiple Vite to run simultaneously.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /