sveltejs/rollup-plugin-svelte — explained in plain English
Analysis updated 2026-07-07 · repo last pushed 2026-05-20
Gradually introduce Svelte components into an existing web application that already uses Rollup.
Import and compile third-party Svelte components from shared packages for a smaller output.
Configure CSS handling to either extract styles into separate files or inject them via JavaScript.
| sveltejs/rollup-plugin-svelte | typicode/fetchival | juliangarnier/3d-hartwig-chess-set | |
|---|---|---|---|
| Stars | 516 | 520 | 537 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2026-05-20 | 2018-12-06 | 2023-03-31 |
| Maintenance | Maintained | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | designer |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Rollup configuration and Svelte installed as a dependency in your project.
Rollup-plugin-svelte is a bridge between two tools: Svelte, a framework for building web interfaces, and Rollup, a tool that bundles JavaScript files together for deployment. On its own, Rollup doesn't understand Svelte's special component files. This plugin teaches Rollup how to read those files and translate them into standard JavaScript and CSS that web browsers can run. At a high level, when you write a Svelte component (a file that combines HTML, CSS, and JavaScript in one place), it needs to be compiled into plain code before it reaches a user's browser. You plug this tool into your Rollup configuration, and every time Rollup encounters a Svelte file, it hands it off to this plugin. The plugin then converts the component into browser-ready output. You can configure it to handle custom file extensions, filter which files get processed, and decide how CSS styles are handled, either by extracting them into separate files or injecting them directly into the page through JavaScript. This tool would be used by developers who already use Rollup as their bundler and want to incorporate Svelte components into their project. For example, if you maintain an existing web application built with Rollup and want to gradually introduce Svelte for individual UI pieces, this plugin makes that possible. It also includes a feature for importing third-party Svelte components from shared packages, ensuring your app uses the uncompiled source code, which produces a smaller, faster end product and reduces version conflicts. However, the README itself notes that most people starting new projects today should look elsewhere. The maintainers recommend using SvelteKit or Vite instead, which are more modern build setups that handle Svelte out of the box. This plugin remains relevant primarily for teams with existing Rollup-based workflows who aren't ready to switch, or for library authors publishing Svelte components to shared registries.
A plugin that lets Rollup bundle Svelte components by compiling them into standard JavaScript and CSS. Mainly for existing Rollup projects, new projects should use Vite or SvelteKit instead.
Mainly JavaScript. The stack also includes JavaScript, Rollup, Svelte.
Maintained — commit in last 6 months (last push 2026-05-20).
This project uses the MIT license, meaning you can use, modify, and distribute it freely for any purpose, including commercially, as long as you include the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.