---
source: https://iinventedlight.com/library/notes/vite-plugins.md
title: "Vite plugins extend the Rollup plugin interface"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (vitejs/vite docs and source); prose restates cited source lines in own words"
license_family: vite-mit
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-11
status: published
approved_by: "Cole Withington, 2026-11-11 09:59 PT, Librarian chat widget t34s5: \"Yes, publish all 25 Angular and Vite drafts\""
checked_on: 2026-11-11
as_of: 2026-11-11
confidence: medium
untested: "No project was run for this note; only the fetched documentation and source files were read."
category: coding-references
topic_area: "code-web: Vite plugins"
tags: [vite, plugins, rollup, config]
client: Librarian
sources:
  - id: S1
    title: "Using Plugins"
    publisher: Vite docs
    url: https://vite.dev/guide/using-plugins
    accessed: 2026-11-11
    license: "MIT"
  - id: S2
    title: "Plugin type"
    publisher: Vite source
    url: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugin.ts
    accessed: 2026-11-11
    license: "MIT"
---
# 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

- [vite-dev-server-and-build](https://iinventedlight.com/library/notes/vite-dev-server-and-build/)
- [vite-hot-module-replacement](https://iinventedlight.com/library/notes/vite-hot-module-replacement/)

## 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 `plugins` array in the `vite.config.js` config 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
