From partme-ai-full-stack-skills
Guides Rollup bundler configuration for JavaScript libraries including plugins, tree shaking, code splitting, and multi-format ESM/CJS/UMD builds.
npx claudepluginhub partme-ai/full-stack-skills --plugin t2ui-skillsThis skill uses the workspace's default tool permissions.
Use this skill whenever the user wants to:
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Use this skill whenever the user wants to:
rollup.config.js with input, output, and pluginsrollup -c to generate bundlesmain, module, and exports in package.json// rollup.config.js
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
export default {
input: 'src/index.js',
output: [
{
file: 'dist/index.cjs.js',
format: 'cjs',
sourcemap: true,
},
{
file: 'dist/index.esm.js',
format: 'es',
sourcemap: true,
},
],
external: ['react', 'react-dom'], // Don't bundle peer deps
plugins: [
resolve(),
commonjs(),
terser(), // Minify for production
],
};
# Build
npx rollup -c
# Watch mode for development
npx rollup -c --watch
// package.json — library distribution fields
{
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js"
}
},
"files": ["dist"],
"sideEffects": false
}
// Dynamic imports create separate chunks
export default {
input: 'src/index.js',
output: {
dir: 'dist',
format: 'es',
chunkFileNames: 'chunks/[name]-[hash].js',
},
plugins: [resolve(), commonjs()],
};
external to avoid bundling themsideEffects: false in package.json to enable maximum tree shakingimport() for on-demand loadingrollup, bundler, ESM, CJS, tree-shaking, code splitting, library bundling, plugins