This makes sure we only pass the as value's `pathname` instead of the full value so that we don't accidentally include `query` values while resolving the rewrites. This also adds tests to ensure the rewrites are resolved with the correct query values when only providing `href` and when manually mapping them with `href` and `as`
Fixes: https://github.com/vercel/next.js/issues/16825
* fix(with-react-relay-network-modern): fix README.md typo error
* fix(with-react-relay-network-modern): should not use store cache for create environment
* fix(with-react-relay-network-modern): should not request api again
* feat(with-react-relay-network-modern): add relay-hooks package
* feat(with-react-relay-network-modern): use new RelayEnvironmentProvider
* feat(with-react-relay-network-modern): add useQuery hook
* fix(with-react-relay-network-modern): fix cache error
* fix(with-react-relay-network-modern): fix server loading
Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This adds initial support for reloading the page when `getStaticProps`, `getStaticPaths`, or `getServerSideProps` were changed for a page by triggering a reload when the server output for a page has changed but the client output has not since these methods aren't included in the client output.
Closes: https://github.com/vercel/next.js/issues/13949
* Create _document.js
Includes the lang attribute with current language inside the <html> tag.
* Lint fix
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This is a small change to the image post-processor logic. When it's looking for images to preload, it will now ignore SVGs, as these are rarely the relevant images for LCP.
This PR is to fix "[Examples] Problem with query parameters in with-redux-persist (#15484)"
The root cause is
persist/rehydrate action will issue twice when query parameter is set. But persistStore initial bootstrap is not ready yet. So i add a bootstrap callback and force persistor to persist again to make overall state correct. I also modify the loading prop to a `<div>loading</div>` because it's confuse to set Component in loading prop.
Attached the GIF
![demo](https://user-images.githubusercontent.com/1462027/89922530-bec04000-dc31-11ea-9831-12cd9d436d96.gif)
Closes#15484
This change adds a new example, `with-mdx-remote`, which leverages [`next-mdx-remote`](https://github.com/hashicorp/next-mdx-remote) to use MDX files as content for a dynamic route.
In addition to the basic functionality, the example adds a note about somewhat advanced usage that allows the use of conditionally-loaded custom MDX components.
cc @jescalan
* Include yarn instructions
Yarn seems like it's encouraged elsewhere (such as in create-next-app docs), so adding this to clarify it's supported here.
* Added to a similar case
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Updated `examples/with-tailwindcss` to the newest TailwindCSS, and opted in to future-facing breaking changes.
Also created a jsconfig.json so that files can be imported without traversing up relative paths.
Changes:
- Migrate to TypeScript. `react-intl` natively supports TypeScript now.
- Upgrade corresponding `formatjs` packages.
- Dynamically polyfill Intl API per locale since those polyfills are huge.
- Migrate to recommended workflow per https://formatjs.io/docs/getting-started/application-workflow