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
- id: C1 claim: Vite plugins are based on Rollup's plugin interface with extra Vite options. source: S1 evidence: "which are based on Rollup's well-designed plugin interface with a few extra Vite-specific options."
- id: C2 claim: Add a plugin to the plugins array in vite.config.js. source: S1 evidence: "included in the
pluginsarray in thevite.config.jsconfig file."
- id: C3 claim: A valid Vite plugin is also a valid Rollup plugin. source: S2 evidence: "A valid vite plugin is also a valid Rollup plugin."
- id: C4 claim: Vite plugins extend the Rollup plugin interface with extra options. source: S2 evidence: "Vite plugins extends the Rollup plugin interface with a few extra"
Sources
- [S1] Using Plugins. Vite docs. https://vite.dev/guide/using-plugins . License: MIT. Accessed 2026-11-11.
- [S2] Plugin type. Vite source. https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugin.ts . License: MIT. Accessed 2026-11-11.
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
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.},
}
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.