Project to demonstrate an error when clicking on a link in next.js in dev mode.
npm inpm 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-exportdemonstrates that the bug can be avoided by removing an interface export insrc/types.tsfix-by-removing-sass-importdemonstrates that the bug can be avoided by removing the import of theabout.scssfilebreak-by-removing-css-importdemonstrates that removing the import ofindex.csswill break the link. Clicking will have no effect. Maybe it is related to the hmr bug.