Local Build and Preview
Purpose
Verify production-like output locally before publishing to a hosting platform.
Commands
Build output:
npm run buildPreview with Shevky dev command:
npm run devOr preview static output directly with any static server:
npx serve distValidation Checklist
- Open the homepage and at least one content page.
- Confirm CSS and JS bundles load without 404 errors.
- Check generated support files exist:
dist/robots.txt,dist/sitemap.xml,dist/feed.xml. - Verify canonical URLs in the HTML source match expected values.
Common Issues
| Issue | Fix |
|---|---|
| Port conflict on 3000 | Stop conflicting process or use npx serve dist -l 8080 |
| Missing CSS/JS bundles | Verify src/css/app.css and src/js/app.js exist and plugins are listed |
| Stale content | Build clears dist/ automatically; delete manually if needed |