← All notes

Vite is extended by plugins based on the Rollup plugin interface

Answer: Vite can be extended with plugins. Those plugins are based on Rollup's plugin interface, plus a few Vite-specific options. That means you can often use the existing Rollup plugin ecosystem, and you can also extend the dev server and SSR behavior.

To use a plugin, add it to the project's devDependencies and include it in the plugins array in vite.config.js. The official @vitejs/plugin-legacy plugin is one example. The plugins array also accepts a preset that is itself a list of plugins; the array is flattened internally. Falsy plugins are ignored, so you can turn a plugin on or off easily.

Before you search for a plugin, check the Features guide. Many cases that need a plugin in a Rollup project are already covered in Vite.

In source

A valid Vite plugin is also a valid Rollup plugin. A Rollup plugin may not be a valid Vite plugin, since some Rollup features do not make sense in an unbundled dev server context. Vite also lets a plugin handle HMR updates and return a filtered list of modules to update.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vite docs and Vite source (vitejs/vite), MIT. Notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE).

Cite this

Permanent ID: iil:note:wsaswnqb

iinventedlight. 2026. "Vite plugins extend the Rollup plugin interface." iinventedlight Library, iil:note:wsaswnqb, version of 2026-11-11. https://iinventedlight.com/library/notes/vite-plugins/. License: CC-BY-4.0.

@misc{iil_note_wsaswnqb,
  author = {{iinventedlight}},
  title = {{Vite plugins extend the Rollup plugin interface}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-11},
  url = {https://iinventedlight.com/library/notes/vite-plugins/},
  note = {Permanent ID iil:note:wsaswnqb. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vite-plugins.md.