Skip to Content
Developer GuideBuild & Production

Build & Production

npm Scripts Reference

ScriptDescription
npm run devStart the Next.js development server (hot-reload, always SSR)
npm run buildFull production build — runs prebuild first automatically
npm run prebuildCompile themes (generate:style) then switch page files (switchPage.js)
npm run generate:styleCompile all SCSS theme folders to public/assets/theme/
npm startStart the production build (SSR/ISR only; SSG serves static files directly)
npm run lintRun ESLint across the project

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 server
Last updated on