When to use this skill
Use this skill whenever the user wants to:
- Use Rollup to bundle libraries or applications, Tree-shaking, multi-format output (ESM/CJS)
- Configure input, output, plugin, and external dependencies
How to use this skill
- Configuration:rollup.config.js;input、output.format、output.file/dir;plugins(node-resolve、commonjs、terser)。
- Mode: multi-format for library bundling; applications can work with Vite or in combination with other tools.
- Reference:https://rollupjs.org/
Best Practices
- Declare external for libraries; keep sourcemap for easier debugging.
- Externalize large dependencies; use code-splitting as needed.
Keywords
rollup, bundling, ESM, tree-shaking