The tutorial can be found at: https://nextjs.org/learn/react-foundations
// Chapter-09_Installing Next.js/next.config.js
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',
distDir: '../docs',
assetPrefix: '/nextjs-react-foundations/',
}
module.exports = nextConfig
Remember to put an empty file .nojeyll named in the output folder or Github will ignore all the js files in _next folder
// Chapter-09_Installing Next.js/package.json
{
"scripts": {
"dev": "next dev",
"build": "next build && touch ../docs/.nojekyll"
},
"dependencies": {
"next": "^14.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
NextJS.org - tutorial https://nextjs.org/learn/react-foundations
This README has been optimized for accessibility based on GitHub's blogpost "Tips for Making your GitHub Profile Page Accessible"