Source is at https://github.com/nfriedly/user-agent.io if anyone is interested.
I'm thinking about switching some of my work projects over to it sometime soon.
Source is at https://github.com/nfriedly/user-agent.io if anyone is interested.
I'm thinking about switching some of my work projects over to it sometime soon.
If you actually wanted the page to feel fast you would probably do something like <script>document.write(window.navigator.userAgent)</script>
I did not expect to argue in HN of all places whether it's OK or not to run the development mode of a library in production when it's so simple not to and the authors are trying so hard to prevent people from doing that.
Although, with server-side rendering (which is part of what I really like about Next.js), the impact should be reduced somewhat.
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`. ¯\_(ツ)_/¯
I sent a pull request to fix it: https://github.com/lukehansell/react-google-ad/pull/5
Update: Yep, GitHub highlights correctly with a .jsx extension - see https://github.com/nfriedly/user-agent.io/blob/jsx-test/page... - but then Next.js can't "see" the page :(
So, I'm going to have to stick with .js for now.