bug: no hot reloading on changes in components
NickyMeuleman opened this issue · 1 comments
The site doesn't automatically reload anymore on changes made in components, you have to manually click refresh.
@JesseRWeigel's confusion as to why he didn't see style changes he made on today's stream tipped me off to this.
I think this behaviour might be related to #71
After testing a bunch of previous versions and seeing if the problem was there then.
I think I tracked down the piece of code causing this issue.
If I comment out
// Make a universal Route
server.get('/:type/:id', (req, res) => {
renderAndCache(req, res, '/page', {
id: req.params.id,
type: `${req.params.type}Pages`
})
})
in the server.js
file. The problem goes away and you see changes made in components again.
The errors in #71 also go away, so these two definitely seem connected.
edit: apparently this issue was fixed in an older next update, weird this newer version has this issue.
vercel/next.js#1667 (comment)
Now to find a solution to this problem, maybe nextJS update?
edit: will try to find fix for this and report back, if worst comes to worst we can always remove the universal route and go back to hardcoding every route that's needed.
Fixed in #73