* AMP page reload
* Fix comment
* Skip dev files in production
* Polyfill event source
* Add HMR test for AMP
* Use webdriver
* Use a dynamic server for HMR test
* ffs
Next.js no longer uses `jsonPageRes`.
This PR removes it from `en-us` and `zh-cn` documentation (formatting picked up some changes on zh-cn readme).
Also updated the Flow type def for `getInitialProps`.
Resolves#6363
We don't use a lot of the features of `glob`, so let's remove it in favor of a leaner approach using regex.
It's failing on windows and I have no idea why and don't own a windows machine 🤦🏼♂️
(Ignore some of the commits in here, I forgot to create the new branch before I started working)
[React ESI](https://github.com/dunglas/react-esi) is a brand new cache library for vanilla React and Next.js applications, that can make highly dynamic applications as fast as static sites by leveraging the open Edge Server Include specification.
https://github.com/dunglas/react-esi
Because this spec is widespread, React ESI natively supports most of the well-known cloud cache providers including Cloudflare Workers, Akamai and Fastly. Of course, React ESI also supports the open source Varnish cache server that you can use in your own infrastructure for free (configuration provided).
This PR shows how to integrate React ESI with Next.js.
This introduces a new `<Html>` tag for a custom `Document` so that we can correctly toggle the `amp` flag (among other things in the future ... maybe).
This is already "tested" through every other test & the AMP validator -- but let me know if we want explicit tests.
Currently, `getBaseWebpackConfig` is marked async, but it doesn't await anything or otherwise return a Promise. Please correct me if I am wrong, but it looks like it can be made synchronous.
After talking with @timneutkens it was decided it'd be more streamlined to replace the onDemandEntries WebSocket with an alternative. Using the EventSource connection gives us these benefits over the WebSocket one:
- less code needed
- no extra server running
- no extra config for onDemandEntries