diff --git a/examples/with-sitemap-and-robots-express-server/README.md b/examples/with-sitemap-and-robots-express-server/README.md index d7b471b646ce..414e3f368fe2 100644 --- a/examples/with-sitemap-and-robots-express-server/README.md +++ b/examples/with-sitemap-and-robots-express-server/README.md @@ -22,7 +22,7 @@ yarn create next-app --example with-sitemap-and-robots-express-server with-sitem Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-sitemap-and-robots-expres-server +curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-sitemap-and-robots-express-server cd with-sitemap-and-robots-express-server ``` diff --git a/lerna.json b/lerna.json index 9ae06a101bbb..2acdd4267e50 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.1-canary.0" + "version": "9.2.1-canary.2" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 046af185ba9c..db83145c5dc4 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -1,6 +1,6 @@ { "name": "create-next-app", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "keywords": [ "react", "next", diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index cf486f3afe96..3edf8b9a51cc 100644 --- a/packages/next-bundle-analyzer/package.json +++ b/packages/next-bundle-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@next/bundle-analyzer", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index cb6f0061fd52..76e825d3619e 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-plugin-google-analytics/package.json b/packages/next-plugin-google-analytics/package.json index a17c9ca29b5b..463411e6b4e6 100644 --- a/packages/next-plugin-google-analytics/package.json +++ b/packages/next-plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-google-analytics", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "nextjs": { "name": "Google Analytics", "required-env": [ diff --git a/packages/next-plugin-material-ui/package.json b/packages/next-plugin-material-ui/package.json index 2a31bb13bcc6..3303af0dd9bb 100644 --- a/packages/next-plugin-material-ui/package.json +++ b/packages/next-plugin-material-ui/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-material-ui", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index a380e07b3afc..fa780e258d1b 100644 --- a/packages/next-plugin-sentry/package.json +++ b/packages/next-plugin-sentry/package.json @@ -1,6 +1,6 @@ { "name": "@next/plugin-sentry", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next/build/entries.ts b/packages/next/build/entries.ts index f51675d36655..a518b7b9877c 100644 --- a/packages/next/build/entries.ts +++ b/packages/next/build/entries.ts @@ -115,10 +115,19 @@ export function createEntrypoints( } if (!isApiRoute) { - client[bundlePath] = `next-client-pages-loader?${stringify({ + const pageLoader = `next-client-pages-loader?${stringify({ page, absolutePagePath, })}!` + + // Make sure next/router is a dependency of _app or else granularChunks + // might cause the router to not be able to load causing hydration + // to fail + + client[bundlePath] = + page === '/_app' + ? [pageLoader, require.resolve('../client/router')] + : pageLoader } }) diff --git a/packages/next/package.json b/packages/next/package.json index a97bc1054bee..3c173676f08b 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.1-canary.0", + "version": "9.2.1-canary.2", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", diff --git a/packages/next/pages/_app.tsx b/packages/next/pages/_app.tsx index c4041f9613d7..3971441a2433 100644 --- a/packages/next/pages/_app.tsx +++ b/packages/next/pages/_app.tsx @@ -7,7 +7,6 @@ import { AppPropsType, } from '../next-server/lib/utils' import { Router } from '../client/router' -import '../client/router' export { AppInitialProps } diff --git a/packages/next/pages/_document.tsx b/packages/next/pages/_document.tsx index 2134fc9aee8a..5d63deda249b 100644 --- a/packages/next/pages/_document.tsx +++ b/packages/next/pages/_document.tsx @@ -570,7 +570,7 @@ export class NextScript extends Component { return (