Files
nodeMap/docs/build-and-deploy.md

52 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- /docs/build-amddeploy.md -->
# 🛠 Deployment & Build-Verhalten (Next.js)
Diese Datei beschreibt, welche Projektdateien in den Build (`.next/`) aufgenommen werden und welche
nicht.
Ziel: Klarheit für Onboarding, Deployment-ZIP-Erstellung oder CI/CD.
---
## 📦 Wird beim `npm run build` in `.next/` gespeichert
| Inhalt | Beschreibung |
| ---------------------- | -------------------------------------------------- |
| Kompilierte Seiten | Alle unter `/pages/` |
| API-Routen | Alles aus `pages/api/` |
| Assets aus `public/` | Werden im Build nicht verändert, aber ausgeliefert |
| CSS-Dateien (Tailwind) | Werden gebundelt und minimiert |
| `.env.local` | Wird eingelesen, aber nicht exportiert |
| JS/TS-Quellcode | Wird zu Client- und Server-Bundles kompiliert |
---
## 🧹 Wird **nicht** in `.next/` aufgenommen
| Ordner/Datei | Zweck / Grund |
| --------------------------- | -------------------------------------------- |
| `__tests__`, `__mocks__` | Nur lokal für Tests, nicht im Build |
| `cypress/` | End-to-End-Tests, nur für lokale Entwicklung |
| `scripts/` | Hilfsskripte, nicht für Runtime relevant |
| `docs/` | Dokumentation, nur für Entwickler |
| `README.md`, `CHANGELOG.md` | Doku nicht erforderlich zur Laufzeit |
| `Jenkinsfile`, `.github/` | CI/CD wird vom Buildsystem verwendet |
---
## 📂 Empfohlene Struktur für Deployment (z.B. ZIP-Upload auf Server)
Nur folgende Dateien/Ordner übertragen:
```bash
.next/
public/
package.json
package-lock.json
.env.local
```
---
[Zurück zur Übersicht](README.md)