frontend-bundler-config
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 8
- Forks
- 0
02 资源文件 1
- 参考文档evals.json680 B
03 SKILL.md 正文
frontend-bundler-config
Every config change ships with a measurement — bundle bytes, build seconds, or dev-server start — proving it helped.
What you do
Tune the frontend build against a number, not a hunch. Take a measurement first, change one thing, measure again.
- Start from data: run the bundle analyzer or capture build timing before touching config.
- Code-split at route and heavy-dependency boundaries; lazy-load what's below the fold or behind a click.
- Make tree shaking actually work — ship ESM, keep
sideEffectshonest inpackage.json, and avoid barrel files that pull in the world. - Hash asset filenames for cache-busting; inline only the smallest assets.
- Inject env vars at build time from a documented allowlist; never let a secret reach the client bundle — everything shipped is public.
- Set a bundle-size budget and make the build fail when it's exceeded.
Output shape
A config diff plus its measurement:
- Config diff — the Vite / Webpack / esbuild / Rollup change.
- Measurement — before/after bundle size, build time, or dev-server start.
- Split points — which chunks were carved out and what triggers their load.
- Env-var contract — the build-time variable allowlist (and what's deliberately excluded).
- Budget — the size budget and where it's enforced in the build.
Anti-patterns
- A config change with no before/after number — you can't tell if it helped or hurt.
- Secrets in client-exposed env vars — anything in the bundle is readable by anyone.
- Barrel files or CommonJS interop silently defeating tree shaking.
- One monolithic chunk — no splitting, slow first paint, nothing cacheable in isolation.
- Unbounded bundle growth — no budget, no alarm until users complain about load time.
- Over-splitting into hundreds of micro-chunks — a request waterfall that's slower than one chunk.
Handoff
Return the config diff and measurement to the invoking frontend specialist. The CI step that runs this build and enforces the budget gate is devops-ci-cd-pipeline territory — frontend writes the build script, devops wires the pipeline. This skill does not dispatch.
04 同仓库更多 Skills
technical-writer-tutorial
暂无简介
social-media-thread
暂无简介
security-dependency-audit
暂无简介
marketing-launch-plan
暂无简介
marketing-ab-copy-variants
暂无简介
doc-writer-onboarding-doc
Authors onboarding documentation and contributor guides — getting-started narrative pages, CONTRIBUTING.md, developer onboarding docs, new-user setup guides, CODE_OF_CONDUCT.md, GOVERNANCE.md. Pulled by the `doc-writer` specialist. TRIGGER: "write a getting-started guide", "create a CONTRIBUTING.md", "onboarding guide for new developers", "write the contributor guide", "new-user setup documentation", "developer onboarding doc", "write the getting started page", "add a CODE_OF_CONDUCT". DO NOT TRIGGER for: project README overview (use `doc-writer-readme`), onboarding email sequences for existing SaaS users (use `copywriter-email-sequences` — copywriter owns lifecycle nurture emails), API reference docs (use `technical-writer-api-docs`), formal step-by-step tutorials with prerequisite/verify blocks (use `technical-writer-tutorial`), changelogs or release notes (use `technical-writer-release-notes`), marketing copy about onboarding (use `copywriter-long-form`).