es-dev-server-rollup
raw JSON → 0.0.8 verified Mon Apr 27 auth: no javascript deprecated
Adapter package (v0.0.8, experimental) to reuse Rollup plugins in es-dev-server, a dev server without bundling. Wraps Rollup plugins so they work with es-dev-server's plugin system, supporting hooks like options, buildStart, resolveId, load, and transform. Unlike Rollup, it does not bundle, focusing on file-by-file transformation. Key differentiator: enables using Rollup's ecosystem of plugins (e.g., replace, json, commonjs) during development without a full build step. Requires explicit handling of non-standard file types via mime type resolution. Last published in 2020; the project has been superseded by @web/dev-server-rollup.
Common errors
error rollup plugin hook not supported: generateBundle ↓
cause The Rollup plugin uses a hook that is not called by es-dev-server.
fix
Use a different plugin that only uses supported hooks (options, buildStart, resolveId, load, transform).
error Cannot find module 'es-dev-server-rollup' ↓
cause The package is not installed.
fix
Run: npm install --save-dev es-dev-server-rollup
Warnings
deprecated Package is experimental and unmaintained since 2020. Use @web/dev-server-rollup instead. ↓
fix npm uninstall es-dev-server-rollup && npm install --save-dev @web/dev-server-rollup
breaking Only a subset of Rollup hooks (options, buildStart, resolveId, load, transform) are supported. Plugins using other hooks (e.g., generateBundle) will silently fail. ↓
fix Check if the Rollup plugin uses unsupported hooks; wrap only supported ones.
gotcha Non-standard file types (e.g., .json) require explicit MIME type resolution to 'js', otherwise es-dev-server may serve them incorrectly. ↓
fix Add a resolveMimeType plugin before wrapRollupPlugin as shown in the documentation.
Install
npm install es-dev-server-rollup yarn add es-dev-server-rollup pnpm add es-dev-server-rollup Imports
- wrapRollupPlugin wrong
const wrapRollupPlugin = require('es-dev-server-rollup');correctimport { wrapRollupPlugin } from 'es-dev-server-rollup';
Quickstart
const replace = require('@rollup/plugin-replace');
const { wrapRollupPlugin } = require('es-dev-server-rollup');
module.exports = {
plugins: [
wrapRollupPlugin(
replace({ include: ['src/**/*.js'], __environment__: '"development"' })
),
],
};