Reputation: 534
I've got a next.js (11) site that generates a bunch of SSG pages. Everything works great when I enter the site through the homepage, which is static and navigate to the SSG page.
BUT, if I go directly to the SSG page, nothing works. Javascript doesn't run. Events aren't attached. No errors. Just... dead except for the static content.
Am I missing something about how Next.js works here? Is there a way to force these pages to function when accessed directly?
The site is running on Netlify. All of this works locally but not in production.
Upvotes: 1
Views: 512
Reputation: 534
The answer for posterity is that there's no reason it should act this way. It's a bug that results from minifying the Javascript on Netlify. Once I turned that off, everything behaved as expected.
Things I tried:
Then, just by chance and desperation, I clicked off the post-processing minification button and everything started working again.
Upvotes: 2