frontend/bundling-frontend/SKILL.md
Configure Vite to build optimized production assets, handling code splitting, tree-shaking, and static asset management.
npx skillsauth add 7a336e6e/skills bundling-frontendInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce a highly optimized, minified set of static assets (JS, CSS, images) ready for deployment to a CDN or static host, with optimal caching strategies.
Configure vite.config.ts for production builds.
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
target: 'esnext',
sourcemap: false, // Disable for prod, enable for staging
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom', 'react-router-dom'],
// Split heavy libs into their own chunks
},
},
},
},
});
Use .env files for build-time configuration.
.env.development: API endpoints for local dev..env.production: API endpoints for prod.Access them via import.meta.env.VITE_API_URL.
vite-plugin-svgr or strictly as URLs.Ensure package.json has standard scripts:
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
}
Always run tsc (TypeScript Compiler) before vite build to catch type errors that Vite (using esbuild) ignores.
VITE_.tsc) before the build step.manualChunks to split large vendor libraries if the main bundle exceeds 500kb.emptyOutDir: true).@/components) to simplify imports and refactoring.index.html; ensure the server sets Cache-Control: no-cache.sourcemap: true in production unless you have a private error reporting service.dist/ folder containing index.html, assets/*.js, assets/*.css.vite.config.ts configuration.../scaffolding-frontend/SKILL.mddevelopment
Implement features using the Red-Green-Refactor cycle to ensure testability and correctness from the start.
data-ai
Manage the `tasks.md` ledger with strict locking and collision avoidance protocols to allow multiple agents to work in parallel safely.
development
The git-workflow skill defines branching conventions, commit message formats, and pull request standards that all agents must follow for consistent version control.
development
The environment-config skill standardizes how agents manage environment variables, secrets, and application configuration across local development and deployed environments.