React & Frontend .gitignore — Next.js, Vite, Vue, Angular
Generate .gitignore files for any stack — instantly, offline, free
Generate .gitignore for React, Next.js, Vue, Angular, Svelte, or Nuxt. Covers build/, .next/, dist/, .env.local, TypeScript cache, and all frontend tooling artifacts.
# ============================================================ # Generated: CalcNation .gitignore Generator · 2026-03-14 # Stacks : Windows, macOS, VS Code, Node.js, React, .env Files, Log Files, Secrets # Format : .gitignore # ============================================================ # ──────────────────────────────────────────────────────────── # OS # ──────────────────────────────────────────────────────────── # 🪟 Windows Thumbs.db ehthumbs.db Desktop.ini $RECYCLE.BIN/ *.cab *.msi *.msm *.msp *.lnk # 🍎 macOS .DS_Store .AppleDouble .LSOverride Icon .Spotlight-V100 .Trashes ._* .fseventsd # ──────────────────────────────────────────────────────────── # IDE # ──────────────────────────────────────────────────────────── # 💙 VS Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace .history/ # ──────────────────────────────────────────────────────────── # LANGUAGE # ──────────────────────────────────────────────────────────── # 💚 Node.js node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* .pnp.cjs .pnp.loader.mjs .yarn/cache dist/ build/ coverage/ # ──────────────────────────────────────────────────────────── # FRAMEWORK # ──────────────────────────────────────────────────────────── # ⚛️ React # React build output build/ .env.local .env.development.local .env.test.local .env.production.local # ──────────────────────────────────────────────────────────── # TOOLS # ──────────────────────────────────────────────────────────── # 🔐 .env Files .env .env.local .env.*.local .env.development .env.test .env.production !.env.example !.env.sample # 📋 Log Files logs/ *.log npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* # 🔑 Secrets # Security — never commit these *.pem *.key *.p12 *.pfx *.cer *.crt id_rsa id_rsa.pub *.secret secrets.json secrets.yaml *.keystore
Frequently Asked Questions
Should I ignore build/ vs dist/?
Both. Create React App outputs to build/, while Vite and most other bundlers output to dist/. Select both Node.js and React stacks to cover all cases.
What about .env.local in Next.js?
The Next.js stack ignores .env.local, .env.development.local, .env.test.local, and .env.production.local — but not .env itself, which should be committed as a template.
What does the Angular stack cover?
Angular adds .angular/ (Angular DevKit cache), dist/, tmp/, .sass-cache/, and TypeScript output. Combine with Node.js and VS Code for a complete Angular project gitignore.
How do I handle Storybook?
Select the Storybook stack from the Tools category. It ignores storybook-static/ — the built Storybook output directory.
Should I ignore .vscode/ for team projects?
Partially. The VS Code stack uses a smart pattern: ignores .vscode/* but explicitly allows settings.json, tasks.json, launch.json, and extensions.json via negation patterns.