yougile-rollup
raw JSON → 3.29.5 verified Mon Apr 27 auth: no javascript deprecated
A stripped-down fork of Rollup v3 (3.29.5) with fsevents removed, intended for internal YouGile use in binary bundling where external binaries/resources are unsupported. Based on Rollup 3.x, not actively maintained for public use; no updates track upstream Rollup 4.x. Not recommended for new projects—use official Rollup v4 instead. Key differentiator: avoids fsevents dependency, but lacks latest features, bug fixes, and is unsupported.
Common errors
error Error: Cannot find module 'fsevents' ↓
cause yougile-rollup removed fsevents dependency; some features like file watcher require it.
fix
Install fsevents globally or avoid using rollup --watch on macOS.
error TypeError: rollup is not a function ↓
cause CommonJS require returns a module object; Rollup v3+ is ESM-only.
fix
Use import { rollup } from 'yougile-rollup' or dynamic import in CJS: const { rollup } = await import('yougile-rollup').
error Error: You must specify input in the rollup options ↓
cause Rollup options object omitted or invalid.
fix
Pass a valid options object with 'input' property: rollup({ input: 'src/index.js' }).
Warnings
deprecated yougile-rollup is based on Rollup v3 and not updated; use official Rollup v4 instead. ↓
fix Migrate to rollup@4: update import paths, review breaking changes in Rollup 4 release notes.
breaking Rollup v3 does not support top-level await in output ES modules (requires experimental flag). ↓
fix Use output.format = 'es' with Rollup v4, or enable experimentalTopLevelAwait in Rollup v3.
gotcha Missing fsevents means file watching via --watch may fail on macOS or cause runtime errors. ↓
fix Do not use --watch on macOS; or mock fsevents externally if needed.
deprecated Returning import attributes from load/transform hooks is deprecated as of Rollup v4.57.0, but this package is locked at v3, so no issue. ↓
fix No action needed for v3; when upgrading, follow official Rollup 5 migration.
Install
npm install yougile-rollup yarn add yougile-rollup pnpm add yougile-rollup Imports
- rollup wrong
const rollup = require('yougile-rollup')correctimport { rollup } from 'yougile-rollup' - rollup (default) wrong
const rollup = require('yougile-rollup').defaultcorrectimport rollup from 'yougile-rollup' - defineConfig
import { defineConfig } from 'yougile-rollup'
Quickstart
import { rollup } from 'yougile-rollup';
const bundle = await rollup({
input: 'src/index.js',
});
const { output } = await bundle.generate({ format: 'es' });
for (const chunkOrAsset of output) {
if (chunkOrAsset.type === 'chunk') {
console.log(chunkOrAsset.code);
}
}
await bundle.close();