* Update HMR Client Runtime
* Increment event when building or different state
* Dismiss Old Type-Only Overlay
* Update packages/next/client/dev/error-overlay/hot-dev-client.js
This allows a page to be fully static (no runtime JavaScript) on a per-page basis.
The initial implementation does not disable JS in development mode as we need to figure out a way to inject CSS from CSS imports / CSS modules without executing the component JS. This restriction is somewhat similar to https://www.gatsbyjs.org/packages/gatsby-plugin-no-javascript/. All things considered that plugin only has a usage of 600 downloads per week though, hence why I've made this option unstable/experimental initially as I'd like to see adoption patterns for it first.
Having a built-in way to do this makes sense however as the people that do want to adopt this pattern are overriding Next.js internals currently and that'll break between versions.
Related issue: #5054 - Not adding `fixes` right now as this implementation needs more work. If anyone wants to work on this feel free to reach out on https://twitter.com/timneutkens
* Disable PnP plugin in webpack 5
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Use full hashes for hot update names
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Disable autodll in webpack 5
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Disable HashedModuleIdsPlugin in webpack 5
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Use regexes for ignoreplugin as it only supports regexes in webpack 5
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* webpack 4 supports resourceRegExp and contextRegExp
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Remove webpack 4 specific properties from the webpack 5 config
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Add library option for webpack 5 support
Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com>
* Fix TypeScript Errors
Co-authored-by: Zack Jackson <zackary.l.jackson@gmail.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
* Add initial process.env stubbing for new env support
* Fix server process.env being stubbed in production
* bump
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
* docs(Link): precise how prefetch works
After this discussion: https://twitter.com/timneutkens/status/1243572726998188036
This might not be the exact good wording though. Let me know!
* Update docs/api-reference/next/link.md
Co-Authored-By: Luis Alvarez D. <luis@zeit.co>
Co-authored-by: Luis Alvarez D. <luis@zeit.co>
* Add support for params in header key/values
* Update todo
* Update with handling for named patterns
* Use compiled package
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
* Add basePath in link component and add/remove it consistently
* Update to not use regex for delBasePath
* Expose addBasePath as router method
* Revert "Expose addBasePath as router method"
This reverts commit 40fed596195c6affabf837e42d472452768e13a3.
* Expose basePath as router field
* Apply suggestion
* Expose basePath as router field
* remove un-used vars
* Update externals
* Apply lint fix
* Update size-limit test
* Update prefetch
* Fix ts(2341)
Property 'handleRequest' is private and only accessible within class 'Server'.ts(2341)
* Update server.js
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>