Project to demonstrate an error when clicking on a link in next.js in dev mode.
npm i
npm run dev
- navigate to http://localhost:3000/
- click on the link
Notice that after reloading the linked page once, the error is gone.
There are three other branches:
fix-by-removing-export
demonstrates that the bug can be avoided by removing an interface export insrc/types.ts
fix-by-removing-sass-import
demonstrates that the bug can be avoided by removing the import of theabout.scss
filebreak-by-removing-css-import
demonstrates that removing the import ofindex.css
will break the link. Clicking will have no effect. Maybe it is related to the hmr bug.