How to generate build files in next js, with Error: Image Optimization using Next.js default loader

preview_player
Показать описание
distDir: 'build',
}

"scripts": {
"dev": "next", // development
"build": "next build && next export",// build next app to .next folder
"start": "next start", // start nextjs server for .next build folder
"prod": "next export" // export nextjs files as bundle like in react app
}

Then deploy the out directory to a static host. or run locally with npm run serve
Рекомендации по теме