Build & Production
npm Scripts Reference
| Script | Description |
|---|---|
npm run dev | Start the Next.js development server (hot-reload, always SSR) |
npm run build | Full production build — runs prebuild first automatically |
npm run prebuild | Compile themes (generate:style) then switch page files (switchPage.js) |
npm run generate:style | Compile all SCSS theme folders to public/assets/theme/ |
npm start | Start the production build (SSR/ISR only; SSG serves static files directly) |
npm run lint | Run ESLint across the project |
SSR / ISR
Standard server-side build. The output is a standalone Node.js server.
# Set build mode in .env.local
NEXT_PUBLIC_BUILD_MODE=ssr # or isr
npm run build # runs prebuild → generate:style + switchPage.js → next build
npm start # start production serverLast updated on