Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports
by nfriedly on Tuesday May 16, 2017 @10:13AM
(#14349703)
Update: 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
Re:Next.js 3.0 Preview: Static Exports and Dynamic Imports
by vmasto on Monday May 15, 2017 @07:45PM
(#14346216)
I'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`. ¯\_(ツ)_/¯
Although, with server-side rendering (which is part of what I really like about Next.js), the impact should be reduced somewhat.