Registry / devops / rollup-esm-206

rollup-esm-206

JSON →
library2.0.6jsnpmunverified

Rollup is a module bundler for JavaScript that compiles small pieces of code into larger, optimized bundles using ES module format. Current stable version is v4.60.2, with active development and frequent releases. Rollup focuses on ES module tree-shaking and produces smaller, faster bundles compared to other bundlers. It supports plugins, multiple output formats (ESM, CJS, IIFE, UMD, AMD), and has both CLI and JavaScript API. Ships TypeScript types.

npm install rollup-esm-206
INSTALL
IMPORT
SIG · ROLLUP-ESM-206
R
rollup-esm-206
devopsjavascriptv2.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rollup
import { rollup } from 'rollup'
const rollup = require('rollup')
ESM-only since v3; named export, not default. Also available as `rollup` CLI command.
RollupOptions
import type { RollupOptions } from 'rollup'
import { RollupOptions } from 'rollup'
TypeScript type import; use `import type` to avoid runtime issues.
watch
import { watch } from 'rollup'
import watch from 'rollup'
Named export; watch is not a default export.

Basic Rollup configuration using ESM config file, bundling a single input to an ES module output.

// rollup.config.mjs export default { input: 'src/main.js', output: { file: 'bundle.js', format: 'esm' } }; // Terminal // rollup -c rollup.config.mjs
rollup --version
Debug
Known issues
breakingRollup v3 onwards requires Node.js >=14 and uses ESM-only API.
fix
Update to Node.js >=14. Use `import` instead of `require()` for rollup API.
affects: >=3.0.0
breakingRollup v4 drops support for Node.js 10 and 12.
fix
Use Node.js >=14.18.0 (or >=16 for some features).
affects: >=4.0.0
deprecatedReturning import attributes from `load` or `transform` hooks is deprecated in v4.57.0 and will be removed in v5.
fix
Use the separate `resolveImportAttributes` hook or attach attributes via module info.
affects: >=4.57.0 <5.0.0
gotchaWhen using `output.format: 'cjs'`, dynamic imports become `Promise.resolve(require(...))` which is synchronous; use `output.dynamicImportInCjs: false` to keep async behavior.
fix
Set `output.dynamicImportInCjs: 'false'` in rollup config.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup'
Rollup is not installed or used in a non-ESM context.
fix
Run `npm install rollup` and ensure your project is configured for ESM (e.g., `"type": "module"` in package.json or use .mjs file extension).
SyntaxError: Unexpected token 'export'
Using ESM syntax in a CommonJS file without proper configuration.
fix
Rename config file to `rollup.config.mjs` or add `"type": "module"` to package.json.
(!) Plugin node-resolve: unable to resolve dependency ...
A dependency is missing from node_modules or not resolved by @rollup/plugin-node-resolve.
fix
Install the missing dependency and ensure it is listed in package.json. Also check if the plugin is configured correctly.
TypeError: Cannot destructure property 'rollup' of ... as it is undefined.
Incorrect import pattern when using CommonJS require with ESM-only versions of rollup.
fix
Use `const { rollup } = await import('rollup')` or switch to ESM imports.
Upgrade
Version history
2.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
rollup-esm-206 — npm install rollup-esm-206 · libregistry