About rollup
A skill for configuring Rollup to bundle libraries or applications, including input, output formats, plugins, and external dependencies. It also outlines practices such as preserving sourcemaps and using code-splitting when appropriate.
Key features
- 01Configure inputs and outputs
- 02Set up Rollup plugins
- 03Bundle libraries in multiple formats
- 04Manage external dependencies
- 05Use sourcemaps and code-splitting
Use cases
- 01Bundle a library as ESM and CJS
- 02Configure plugins for a Rollup build
- 03Externalize large dependencies
- 04Keep sourcemaps for debugging
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ build-skills --skill rollupAfter installing, type/rollupin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 用 Rollup 打包库或应用、Tree-shaking、多格式输出(ESM/CJS)
- 配置 input、output、plugin 与外部依赖
How to use this skill
- 配置:rollup.config.js;input、output.format、output.file/dir;plugins(node-resolve、commonjs、terser)。
- 模式:库打包多格式;应用可与 Vite 或配合其他工具。
- 参考:https://rollupjs.org/
Best Practices
- 库声明 external;保留 sourcemap 便于调试。
- 大依赖外部化;按需用 code-splitting。
Keywords
rollup, 打包, ESM, tree-shaking
Comments
Markdown supported