4 ms·
Hum, that's interesting. I do have NODE_ENV=production set. I'll have to see if Next.js needs something additional. Although, with server-side rendering (which
by nfriedly 9y ago
Hum, that's interesting. I do have NODE_ENV=production set. I'll have to see if Next.js needs something additional.
Although, with server-side rendering (which is part of what I really like about Next.js), the impact should be reduced somewhat.
- vmasto 9y agoI'm afraid it won't reduce the impact, your server takes the initial load of rendering instead of the browser, and the browser takes over for each re-render. Not sure how Next.js does it but you should probably try putting NODE_ENV=production in the "build" script in package.json like in "start"? I had a quick glance over Next.js's docs and it looks like they should handle this automatically just by `next build`. ¯\_(ツ)_/¯
- nfriedly 9y agoThat's a good thought with the build script, but I tried it locally and it didn't seem to make a difference.
- nfriedly 9y agoUpdate: with some serious help from Arunoda, I've learned that it was due to the react-google-ad component I was using bundling it's own copy of react. So, while the rest of the site was using production-mode React, that one component wasn't and that was enough to trigger the warning in the Chrome extension. I sent a pull request to fix it: https://github.com/lukehansell/react-google-ad/pull/5 https://github.com/lukehansell/react-google-ad/pull/5