diff --git a/.github/ISSUE_TEMPLATE/1.Bug_report.md b/.github/ISSUE_TEMPLATE/1.Bug_report.md index 6c10e9edc66b..ba86015e91e3 100644 --- a/.github/ISSUE_TEMPLATE/1.Bug_report.md +++ b/.github/ISSUE_TEMPLATE/1.Bug_report.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a bug report for the Next.js core +about: Create a bug report for the Next.js core / examples --- # Bug report diff --git a/.github/ISSUE_TEMPLATE/3.Example_Bug_report.md b/.github/ISSUE_TEMPLATE/3.Example_Bug_report.md deleted file mode 100644 index a1640aee8e59..000000000000 --- a/.github/ISSUE_TEMPLATE/3.Example_Bug_report.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -name: Bug report for examples -about: Create a bug report for one of the Next.js examples ---- - -# Examples bug report - -## Example name - -Provide the example name - -## Describe the bug - -A clear and concise description of what the bug is. - -## To Reproduce - -Steps to reproduce the behavior, please provide code snippets or a repository: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -## Expected behavior - -A clear and concise description of what you expected to happen. - -## Screenshots - -If applicable, add screenshots to help explain your problem. - -## System information - -- OS: [e.g. macOS, Windows] -- Browser (if applies) [e.g. chrome, safari] -- Version of Next.js: [e.g. 6.0.2] - -## Additional context - -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/8.Question_about_next.md b/.github/ISSUE_TEMPLATE/8.Question_about_next.md deleted file mode 100644 index 0b509c2a9f82..000000000000 --- a/.github/ISSUE_TEMPLATE/8.Question_about_next.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: Question about Next.js -about: If you have a question related to Next.js or the examples. Reach out to the community on https://spectrum.chat/next-js ---- - -# Question about Next.js - -GitHub Issues are reserved for Bug reports and Feature requests. The best place to get your question answered is to post it on https://spectrum.chat/next-js. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..3ea766fd6d3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Ask a question + url: https://github.com/zeit/next.js/discussions + about: Ask questions and discuss with other community members diff --git a/contributing.md b/contributing.md index 38b6dada03ae..907253d4ba24 100644 --- a/contributing.md +++ b/contributing.md @@ -134,7 +134,7 @@ Description Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/DIRECTORY_NAME) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/DIRECTORY_NAME) ## How to use @@ -167,5 +167,5 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ```` diff --git a/docs/deployment.md b/docs/deployment.md index 3fbc580c636c..3ddbb1de16bb 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -15,8 +15,8 @@ If you haven’t already done so, push your Next.js app to a Git provider of you Then, follow these steps: 1. [Sign up to ZEIT Now](https://zeit.co/signup) (no credit card is required). -2. After signing up, you’ll arrive on the [“Create a new project”](https://zeit.co/new) page. Under “From your existing code”, choose the Git provider you use and set up an integration. (Instructions: [GitHub](https://zeit.co/docs/v2/git-integrations/zeit-now-for-github) / [GitLab](https://zeit.co/docs/v2/git-integrations/zeit-now-for-gitlab) / [BitBucket](https://zeit.co/docs/v2/git-integrations/zeit-now-for-bitbucket)). -3. Once that’s set up, click “New Project From …” and import your Next.js app. It auto-detects that your app is using Next.js and sets up the build configuration for you. No need to change anything — everything just works! +2. After signing up, you’ll arrive on the [“Import Project”](https://zeit.co/import) page. Under “From Git Repository”, choose the Git provider you use and set up an integration. (Instructions: [GitHub](https://zeit.co/docs/v2/git-integrations/zeit-now-for-github) / [GitLab](https://zeit.co/docs/v2/git-integrations/zeit-now-for-gitlab) / [BitBucket](https://zeit.co/docs/v2/git-integrations/zeit-now-for-bitbucket)). +3. Once that’s set up, click “Import Project From …” and import your Next.js app. It auto-detects that your app is using Next.js and sets up the build configuration for you. No need to change anything — everything just works! 4. After importing, it’ll deploy your Next.js app and provide you with a deployment URL. Click “Visit” to see your app in production. Congratulations! You’ve just deployed your Next.js app! If you have questions, take a look at the [ZEIT Now documentation](https://zeit.co/docs). diff --git a/errors/invalid-getstaticpaths-value.md b/errors/invalid-getstaticpaths-value.md index df190e72205e..49ba0064159b 100644 --- a/errors/invalid-getstaticpaths-value.md +++ b/errors/invalid-getstaticpaths-value.md @@ -9,7 +9,7 @@ In one of the page's `unstable_getStaticPaths` the return value had the incorrec Make sure to return the following shape from `unstable_getStaticPaths`: ```js -export async function unstable_getStaticProps() { +export async function unstable_getStaticPaths() { return { paths: Array } diff --git a/errors/routes-must-be-array.md b/errors/routes-must-be-array.md new file mode 100644 index 000000000000..fd4a909dc111 --- /dev/null +++ b/errors/routes-must-be-array.md @@ -0,0 +1,42 @@ +# Custom Routes must return an array + +#### Why This Error Occurred + +When defining custom routes an array wasn't returned from either `headers`, `rewrites`, or `redirects`. + +#### Possible Ways to Fix It + +Make sure to return an array that contains the routes. + +**Before** + +```js +// next.config.js +module.exports = { + experimental: { + async rewrites() { + return { + source: '/feedback', + destination: '/feedback/general', + } + }, + }, +} +``` + +**After** + +```js +module.exports = { + experimental: { + async rewrites() { + return [ + { + source: '/feedback', + destination: '/feedback/general', + }, + ] + }, + }, +} +``` diff --git a/examples/active-class-name/README.md b/examples/active-class-name/README.md index 43c1eb1cbb61..115a0ed88930 100644 --- a/examples/active-class-name/README.md +++ b/examples/active-class-name/README.md @@ -6,7 +6,7 @@ ReactRouter has a convenience property on the `Link` element to allow an author Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/active-class-name) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/active-class-name) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/amp-first/README.md b/examples/amp-first/README.md index 566bca9b6dab..0cd5438142b2 100644 --- a/examples/amp-first/README.md +++ b/examples/amp-first/README.md @@ -11,7 +11,7 @@ This example sets up the boilerplate for an AMP First Site. You can see a live v Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp-first) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp-first) ## How to use @@ -97,4 +97,4 @@ To start the application in production mode, run: $ yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/amp-story/README.md b/examples/amp-story/README.md index b704548ca7d2..6e05c2d42bd7 100644 --- a/examples/amp-story/README.md +++ b/examples/amp-story/README.md @@ -6,7 +6,7 @@ This example shows how to create an AMP page with `amp-story` using Next.js and Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp-story) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp-story) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/amp/README.md b/examples/amp/README.md index 3d2721beace3..faf96be3ed42 100644 --- a/examples/amp/README.md +++ b/examples/amp/README.md @@ -6,7 +6,7 @@ This example shows how to create AMP pages using Next.js and the AMP feature. It Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/amp) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/analyze-bundles/README.md b/examples/analyze-bundles/README.md index 445051ff5c1f..1d43af0c8e99 100644 --- a/examples/analyze-bundles/README.md +++ b/examples/analyze-bundles/README.md @@ -6,7 +6,7 @@ This example shows how to analyze the output bundles using [@next/bundle-analyze Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/analyze-bundles) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/analyze-bundles) ## How to use diff --git a/examples/api-routes-apollo-server-and-client-auth/README.md b/examples/api-routes-apollo-server-and-client-auth/README.md index 825a0141a285..9a107639db06 100644 --- a/examples/api-routes-apollo-server-and-client-auth/README.md +++ b/examples/api-routes-apollo-server-and-client-auth/README.md @@ -13,7 +13,7 @@ https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client-auth) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client-auth) ## How to use @@ -48,4 +48,4 @@ yarn dev > If you have issues installing `bcrypt`, follow this instructions: https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes-apollo-server-and-client/README.md b/examples/api-routes-apollo-server-and-client/README.md index 7312eef050c4..53de5eba5c7a 100644 --- a/examples/api-routes-apollo-server-and-client/README.md +++ b/examples/api-routes-apollo-server-and-client/README.md @@ -13,7 +13,7 @@ https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-apollo-server-and-client) ## How to use @@ -46,4 +46,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes-graphql/README.md b/examples/api-routes-graphql/README.md index efca2bb5d53a..5c583ba56e65 100644 --- a/examples/api-routes-graphql/README.md +++ b/examples/api-routes-graphql/README.md @@ -6,7 +6,7 @@ Next.js ships with [API routes](https://github.com/zeit/next.js#api-routes), whi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-graphql) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-graphql) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes-micro/README.md b/examples/api-routes-micro/README.md index 5fb614b28e18..56b1444b9cad 100644 --- a/examples/api-routes-micro/README.md +++ b/examples/api-routes-micro/README.md @@ -6,7 +6,7 @@ Next.js ships with [API routes](https://github.com/zeit/next.js#api-routes), whi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-micro) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-micro) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes-middleware/README.md b/examples/api-routes-middleware/README.md index e50b54390176..4e058d564928 100644 --- a/examples/api-routes-middleware/README.md +++ b/examples/api-routes-middleware/README.md @@ -6,7 +6,7 @@ Next.js ships with [API routes](https://github.com/zeit/next.js#api-routes), whi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-middleware) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-middleware) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes-rest/README.md b/examples/api-routes-rest/README.md index abb365d53356..abc7eab05490 100644 --- a/examples/api-routes-rest/README.md +++ b/examples/api-routes-rest/README.md @@ -6,7 +6,7 @@ Next.js ships with [API routes](https://github.com/zeit/next.js#api-routes), whi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-rest) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes-rest) ## How to use @@ -22,4 +22,4 @@ yarn create next-app --example api-routes-rest api-routes-rest-app ### Deploy to Now -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/api-routes/README.md b/examples/api-routes/README.md index c37ff56621cf..84a3e2cd8599 100644 --- a/examples/api-routes/README.md +++ b/examples/api-routes/README.md @@ -6,7 +6,7 @@ Next.js ships with [API routes](https://github.com/zeit/next.js#api-routes) whic Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/api-routes) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/basic-css/README.md b/examples/basic-css/README.md index 1b040e404ba2..3c0472b8d2cc 100644 --- a/examples/basic-css/README.md +++ b/examples/basic-css/README.md @@ -6,7 +6,7 @@ Next.js ships with [styled-jsx](https://github.com/zeit/styled-jsx) allowing you Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/basic-css) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/basic-css) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/basic-export/README.md b/examples/basic-export/README.md index 83abdddd3cab..844040d3d0af 100644 --- a/examples/basic-export/README.md +++ b/examples/basic-export/README.md @@ -6,7 +6,7 @@ This example shows the most basic usage of `next export`. Without `exportPathMap Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/basic-export) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/basic-export) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/blog-starter/README.md b/examples/blog-starter/README.md index 60dcc8e12d47..d5045de29577 100644 --- a/examples/blog-starter/README.md +++ b/examples/blog-starter/README.md @@ -10,7 +10,7 @@ The blog is still barebones and need more improvements and styling, but this sho Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/blog-starter) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/blog-starter) ## How to use @@ -44,4 +44,4 @@ now dev ### Deploy -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/catch-all-routes/README.md b/examples/catch-all-routes/README.md index 6a7e2c95c03c..a8dbbd63e8fc 100644 --- a/examples/catch-all-routes/README.md +++ b/examples/catch-all-routes/README.md @@ -15,7 +15,7 @@ You can use `next/link` as displayed in this example to route to these pages cli Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/catch-all-routes) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/catch-all-routes) ## How to use @@ -48,4 +48,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-charset/README.md b/examples/custom-charset/README.md index fdc2706b3b8d..4d61a5e60bdd 100644 --- a/examples/custom-charset/README.md +++ b/examples/custom-charset/README.md @@ -36,4 +36,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-express/README.md b/examples/custom-server-express/README.md index 2c56115987ce..4cbf925479a5 100644 --- a/examples/custom-server-express/README.md +++ b/examples/custom-server-express/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-fastify/README.md b/examples/custom-server-fastify/README.md index ab8db700aa82..94dbb363ce7b 100644 --- a/examples/custom-server-fastify/README.md +++ b/examples/custom-server-fastify/README.md @@ -38,4 +38,4 @@ yarn dev ``` Fastify -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-hapi/README.md b/examples/custom-server-hapi/README.md index 0b5d68cf6384..4381d14393b1 100644 --- a/examples/custom-server-hapi/README.md +++ b/examples/custom-server-hapi/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-koa/README.md b/examples/custom-server-koa/README.md index 5d9365cfbba6..d68235c33538 100644 --- a/examples/custom-server-koa/README.md +++ b/examples/custom-server-koa/README.md @@ -37,7 +37,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Side note: Enabling gzip compression diff --git a/examples/custom-server-micro/README.md b/examples/custom-server-micro/README.md index ef89f4f68307..fa53209214de 100644 --- a/examples/custom-server-micro/README.md +++ b/examples/custom-server-micro/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-nodemon/README.md b/examples/custom-server-nodemon/README.md index 2addd27e5e2b..adfaf167a725 100644 --- a/examples/custom-server-nodemon/README.md +++ b/examples/custom-server-nodemon/README.md @@ -33,4 +33,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-polka/README.md b/examples/custom-server-polka/README.md index 2cb5dae21158..5cb7b6686c98 100644 --- a/examples/custom-server-polka/README.md +++ b/examples/custom-server-polka/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-reasonml/README.md b/examples/custom-server-reasonml/README.md index 9ad89d58e190..ae95f2bbd3e6 100644 --- a/examples/custom-server-reasonml/README.md +++ b/examples/custom-server-reasonml/README.md @@ -59,4 +59,4 @@ yarn start ### Deploy the app -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-typescript/README.md b/examples/custom-server-typescript/README.md index 91dc23a785fb..afd158ce80e7 100644 --- a/examples/custom-server-typescript/README.md +++ b/examples/custom-server-typescript/README.md @@ -36,4 +36,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/custom-server-typescript/nodemon.json b/examples/custom-server-typescript/nodemon.json index 00ea83db9500..577991988d04 100644 --- a/examples/custom-server-typescript/nodemon.json +++ b/examples/custom-server-typescript/nodemon.json @@ -1,5 +1,5 @@ { - "watch": ["server", "static"], + "watch": ["server"], "exec": "ts-node --project tsconfig.server.json server/index.ts", "ext": "js ts" } diff --git a/examples/custom-server/README.md b/examples/custom-server/README.md index b27f3b384c56..8b59862c49ca 100644 --- a/examples/custom-server/README.md +++ b/examples/custom-server/README.md @@ -35,4 +35,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/data-fetch/README.md b/examples/data-fetch/README.md index 24d8fde3a791..bbbd445a5fba 100644 --- a/examples/data-fetch/README.md +++ b/examples/data-fetch/README.md @@ -9,7 +9,7 @@ Using `getInitialProps` fetches data on the server for SSR and then on the clien Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/data-fetch) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/data-fetch) ## How to use @@ -42,4 +42,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/dynamic-routing/README.md b/examples/dynamic-routing/README.md index 93a9e3b90f45..9b4e713e7dca 100644 --- a/examples/dynamic-routing/README.md +++ b/examples/dynamic-routing/README.md @@ -14,7 +14,7 @@ You can use `next/link` as displayed in this example to route to these pages cli Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/dynamic-routing) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/dynamic-routing) ## How to use @@ -47,4 +47,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/form-handler/README.md b/examples/form-handler/README.md index cc606977e36e..810d29f28215 100644 --- a/examples/form-handler/README.md +++ b/examples/form-handler/README.md @@ -33,4 +33,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/head-elements/README.md b/examples/head-elements/README.md index 349d91e3fd2b..92e8ccf58702 100644 --- a/examples/head-elements/README.md +++ b/examples/head-elements/README.md @@ -8,7 +8,7 @@ This example shows in `pages/index.js` how to add a title and a couple of meta t Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/head-elements) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/head-elements) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/hello-world/README.md b/examples/hello-world/README.md index f08c47bf66a7..464f3c16431f 100644 --- a/examples/hello-world/README.md +++ b/examples/hello-world/README.md @@ -6,7 +6,7 @@ This example shows the most basic idea behind Next. We have 2 pages: `pages/inde Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/hello-world) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/hello-world) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/layout-component/README.md b/examples/layout-component/README.md index a7206ae7f44e..598635d96ac4 100644 --- a/examples/layout-component/README.md +++ b/examples/layout-component/README.md @@ -6,7 +6,7 @@ This example shows a very common use case when building websites where you need Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/layout-component) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/layout-component) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/nested-components/README.md b/examples/nested-components/README.md index 7b74712ffefd..77252c62190b 100644 --- a/examples/nested-components/README.md +++ b/examples/nested-components/README.md @@ -6,7 +6,7 @@ Taking advantage of the composable nature of React components we can modularize Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/nested-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/nested-components) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/only-client-render-external-dependencies/README.md b/examples/only-client-render-external-dependencies/README.md index 1364a53bdfe4..5b62b8206361 100644 --- a/examples/only-client-render-external-dependencies/README.md +++ b/examples/only-client-render-external-dependencies/README.md @@ -6,7 +6,7 @@ This example shows how to use an external dependency that only allows client-ren Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/only-client-render-external-dependencies) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/only-client-render-external-dependencies) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/progressive-render/README.md b/examples/progressive-render/README.md index 3beeebd6fe1d..c783b749a1be 100644 --- a/examples/progressive-render/README.md +++ b/examples/progressive-render/README.md @@ -20,7 +20,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/progressive-render) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/progressive-render) ## How to use @@ -53,4 +53,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/shared-modules/README.md b/examples/shared-modules/README.md index 5cf0316d14cc..69febb2238d1 100644 --- a/examples/shared-modules/README.md +++ b/examples/shared-modules/README.md @@ -9,7 +9,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/shared-modules) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/shared-modules) ## How to use @@ -42,4 +42,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/ssr-caching/README.md b/examples/ssr-caching/README.md index d3520c0b6d48..f5252c595482 100644 --- a/examples/ssr-caching/README.md +++ b/examples/ssr-caching/README.md @@ -38,4 +38,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/svg-components/README.md b/examples/svg-components/README.md index f54aaceccd53..a940fd4dc88f 100644 --- a/examples/svg-components/README.md +++ b/examples/svg-components/README.md @@ -6,7 +6,7 @@ This example uses a custom `.babelrc` to add support for importing `.svg` files Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/svg-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/svg-components) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/using-nerv/README.md b/examples/using-nerv/README.md index 073273f3f1cb..4fb37e51f3ee 100644 --- a/examples/using-nerv/README.md +++ b/examples/using-nerv/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/using-preact/README.md b/examples/using-preact/README.md index 4f5d5b81bf01..e1bd3654f5e8 100644 --- a/examples/using-preact/README.md +++ b/examples/using-preact/README.md @@ -38,4 +38,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/using-router/README.md b/examples/using-router/README.md index b700c81a195a..1a42a4e949a7 100644 --- a/examples/using-router/README.md +++ b/examples/using-router/README.md @@ -9,7 +9,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/using-router) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/using-router) ## How to use @@ -42,4 +42,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/using-with-router/README.md b/examples/using-with-router/README.md index d4fbb5110f03..69b95a0c83e4 100644 --- a/examples/using-with-router/README.md +++ b/examples/using-with-router/README.md @@ -8,7 +8,7 @@ You can do that by creating a React Higher Order Component with the help of the Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/using-with-router) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/using-with-router) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-absolute-imports/README.md b/examples/with-absolute-imports/README.md index 432147b87c72..7185e85ec77a 100644 --- a/examples/with-absolute-imports/README.md +++ b/examples/with-absolute-imports/README.md @@ -6,7 +6,7 @@ This example shows how to configure Babel to have absolute imports instead of re Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-absolute-imports) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-absolute-imports) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-algolia-react-instantsearch/README.md b/examples/with-algolia-react-instantsearch/README.md index 5b9481e544ed..1f2c23f3993e 100644 --- a/examples/with-algolia-react-instantsearch/README.md +++ b/examples/with-algolia-react-instantsearch/README.md @@ -38,4 +38,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-ant-design-less/README.md b/examples/with-ant-design-less/README.md index fc234367bc1b..fda89754af93 100644 --- a/examples/with-ant-design-less/README.md +++ b/examples/with-ant-design-less/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Ant Design of React](http://an Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-ant-design-less) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-ant-design/README.md b/examples/with-ant-design/README.md index 6095efe95e8d..0e543765c096 100644 --- a/examples/with-ant-design/README.md +++ b/examples/with-ant-design/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Ant Design of React](http://an Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-ant-design) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-ant-design) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-antd-mobile/README.md b/examples/with-antd-mobile/README.md index c589b2a93b51..9ad0ab6868a0 100644 --- a/examples/with-antd-mobile/README.md +++ b/examples/with-antd-mobile/README.md @@ -6,7 +6,7 @@ This example features how you use [antd-mobile](https://github.com/ant-design/an Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-antd-mobile) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-antd-mobile) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-aphrodite/README.md b/examples/with-aphrodite/README.md index da5b623c333b..7fec568c531a 100644 --- a/examples/with-aphrodite/README.md +++ b/examples/with-aphrodite/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-aphrodite) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-aphrodite) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-apollo-and-redux-saga/README.md b/examples/with-apollo-and-redux-saga/README.md index 58bc50c27a06..a013c99c526a 100644 --- a/examples/with-apollo-and-redux-saga/README.md +++ b/examples/with-apollo-and-redux-saga/README.md @@ -33,7 +33,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Note: diff --git a/examples/with-apollo-and-redux/README.md b/examples/with-apollo-and-redux/README.md index e8390b3576c1..500e41b88378 100644 --- a/examples/with-apollo-and-redux/README.md +++ b/examples/with-apollo-and-redux/README.md @@ -8,7 +8,7 @@ In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's st Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-apollo-and-redux) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-apollo-and-redux) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-apollo/README.md b/examples/with-apollo/README.md index f2286c78f9e8..d26dd92ab647 100644 --- a/examples/with-apollo/README.md +++ b/examples/with-apollo/README.md @@ -15,7 +15,7 @@ https://www.apollographql.com/docs/react/api/react-ssr/#getdatafromtree Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-apollo) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-apollo) _Live Example: https://next-with-apollo.now.sh_ @@ -50,4 +50,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-apollo/lib/apollo.js b/examples/with-apollo/lib/apollo.js index e13a68f240ab..17a40a6d309c 100644 --- a/examples/with-apollo/lib/apollo.js +++ b/examples/with-apollo/lib/apollo.js @@ -1,5 +1,6 @@ import React from 'react' import App from 'next/app' +import Head from 'next/head' import { ApolloProvider } from '@apollo/react-hooks' import createApolloClient from '../apolloClient' @@ -153,6 +154,10 @@ export const withApollo = ({ ssr = false } = {}) => PageComponent => { // https://www.apollographql.com/docs/react/api/react-apollo.html#graphql-query-data-error console.error('Error while running `getDataFromTree`', error) } + + // getDataFromTree does not call componentWillUnmount + // head side effect therefore need to be cleared manually + Head.rewind() } } diff --git a/examples/with-app-layout/README.md b/examples/with-app-layout/README.md index dbf481c3a9a2..137cf1b131e7 100644 --- a/examples/with-app-layout/README.md +++ b/examples/with-app-layout/README.md @@ -6,7 +6,7 @@ Shows how to use \_app.js to implement a global layout for all pages. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-app-layout) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-app-layout) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-asset-imports/README.md b/examples/with-asset-imports/README.md index cc5d865a1b54..a5a339ffe915 100644 --- a/examples/with-asset-imports/README.md +++ b/examples/with-asset-imports/README.md @@ -6,7 +6,7 @@ This example shows how to enable the imports of assets (images, videos, etc.) an Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-asset-imports) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-asset-imports) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Note diff --git a/examples/with-astroturf/README.md b/examples/with-astroturf/README.md index 2c4d5be6a2a5..db756a227f24 100644 --- a/examples/with-astroturf/README.md +++ b/examples/with-astroturf/README.md @@ -6,7 +6,7 @@ This example features how to use [astroturf](https://github.com/4Catalyzer/astro Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-astroturf) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-astroturf) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-babel-macros/README.md b/examples/with-babel-macros/README.md index 7edafbd2726f..1a94787c2e90 100644 --- a/examples/with-babel-macros/README.md +++ b/examples/with-babel-macros/README.md @@ -6,7 +6,7 @@ This example features how to configure and use [`babel-macros`](https://github.c Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-babel-macros) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-babel-macros) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Note diff --git a/examples/with-carbon-components/README.md b/examples/with-carbon-components/README.md index e422bd851e42..8b414f382bc3 100644 --- a/examples/with-carbon-components/README.md +++ b/examples/with-carbon-components/README.md @@ -8,7 +8,7 @@ Create your own theme with Carbon Design System's [theming tools](http://themes. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-carbon-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-carbon-components) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-cerebral/README.md b/examples/with-cerebral/README.md index 8079ddec38c1..e06b8327a9c1 100644 --- a/examples/with-cerebral/README.md +++ b/examples/with-cerebral/README.md @@ -38,7 +38,7 @@ function getUser() { Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cerebral) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cerebral) ## How to use @@ -71,4 +71,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-chakra-ui/README.md b/examples/with-chakra-ui/README.md index aca0ee1f19f9..587817d899eb 100644 --- a/examples/with-chakra-ui/README.md +++ b/examples/with-chakra-ui/README.md @@ -8,7 +8,7 @@ We are connecting the Next.js `_app.js` with `chakra-ui`'s Theme and ColorMode c Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-chakra-ui) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-chakra-ui) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-componentdidcatch/README.md b/examples/with-componentdidcatch/README.md index 19194f8971ea..c50f2508a0c3 100644 --- a/examples/with-componentdidcatch/README.md +++ b/examples/with-componentdidcatch/README.md @@ -6,7 +6,7 @@ This example shows how to catch errors caught by `componentDidCatch` in React's Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-componentdidcatch) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-componentdidcatch) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-configured-preset-env/README.md b/examples/with-configured-preset-env/README.md index 5d760634af53..06e68e5a3b1c 100644 --- a/examples/with-configured-preset-env/README.md +++ b/examples/with-configured-preset-env/README.md @@ -6,7 +6,7 @@ This example shows how to customize `.babelrc` with `@babel/preset-env`. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-configured-preset-env) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-configured-preset-env) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-context-api/README.md b/examples/with-context-api/README.md index 56e542c331c5..1acc7a0772b4 100644 --- a/examples/with-context-api/README.md +++ b/examples/with-context-api/README.md @@ -14,7 +14,7 @@ The `pages/about.js` shows how to pass an increment value from the about page in Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-context-api) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-context-api) ## How to use @@ -47,4 +47,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-cookie-auth-fauna/README.md b/examples/with-cookie-auth-fauna/README.md index 8fc7b80ebd6d..d8cbd9c486a9 100644 --- a/examples/with-cookie-auth-fauna/README.md +++ b/examples/with-cookie-auth-fauna/README.md @@ -62,4 +62,4 @@ We'll use [now](https://zeit.co/now) to deploy our app, first we need to add the now secrets add fauna-secret-key "ENTER YOUR FAUNA SERVER KEY" ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-cookie-auth/README.md b/examples/with-cookie-auth/README.md index 9e64c07fb6e5..a3659ff3c02e 100644 --- a/examples/with-cookie-auth/README.md +++ b/examples/with-cookie-auth/README.md @@ -14,7 +14,7 @@ The helper function `auth` helps to retrieve the token across pages and redirect Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cookie-auth) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cookie-auth) ## How to use @@ -49,4 +49,4 @@ $ (with-cookie-auth/) yarn dev ### Deploy -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-custom-babel-config/README.md b/examples/with-custom-babel-config/README.md index 8c0ae6b026cc..a0d1e5731150 100644 --- a/examples/with-custom-babel-config/README.md +++ b/examples/with-custom-babel-config/README.md @@ -12,7 +12,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-custom-babel-config) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-custom-babel-config) ## How to use @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-cxs/README.md b/examples/with-cxs/README.md index 91c25209b92b..3bdb098e677c 100644 --- a/examples/with-cxs/README.md +++ b/examples/with-cxs/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cxs) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-cxs) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-dotenv/README.md b/examples/with-dotenv/README.md index 7e6480052930..4e9973e88042 100644 --- a/examples/with-dotenv/README.md +++ b/examples/with-dotenv/README.md @@ -6,7 +6,7 @@ This example shows how to inline env vars. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dotenv) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dotenv) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Note diff --git a/examples/with-draft-js/README.md b/examples/with-draft-js/README.md index 2e9c1eb1b208..7611df7ce7b4 100644 --- a/examples/with-draft-js/README.md +++ b/examples/with-draft-js/README.md @@ -8,7 +8,7 @@ This example aims to provides a fully customizable example of the famous medium Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-draft-js) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-draft-js) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-dynamic-app-layout/README.md b/examples/with-dynamic-app-layout/README.md index 83205636d57e..5023b2008e48 100644 --- a/examples/with-dynamic-app-layout/README.md +++ b/examples/with-dynamic-app-layout/README.md @@ -6,7 +6,7 @@ Shows how to use _app.js to implement \_dynamic_ layouts for pages. This is achi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dynamic-app-layout) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dynamic-app-layout) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-dynamic-import/README.md b/examples/with-dynamic-import/README.md index 29ebeae8a8ab..0188050bdbac 100644 --- a/examples/with-dynamic-import/README.md +++ b/examples/with-dynamic-import/README.md @@ -6,7 +6,7 @@ This examples shows how to dynamically import modules via [`import()`](https://g Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dynamic-import) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-dynamic-import) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-emotion-10/README.md b/examples/with-emotion-10/README.md index 9a085455f878..ba0beb39eb96 100644 --- a/examples/with-emotion-10/README.md +++ b/examples/with-emotion-10/README.md @@ -10,7 +10,7 @@ and [@emotion/styled](https://github.com/emotion-js/emotion/tree/master/packages Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion-10) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion-10) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-emotion-11/README.md b/examples/with-emotion-11/README.md index a826427817a1..f9022984f50c 100644 --- a/examples/with-emotion-11/README.md +++ b/examples/with-emotion-11/README.md @@ -6,7 +6,7 @@ Extract and inline critical css with [@emotion/react](https://www.npmjs.com/pack Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion-11) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion-11) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-emotion/README.md b/examples/with-emotion/README.md index d064395f3754..8c61cf01a825 100644 --- a/examples/with-emotion/README.md +++ b/examples/with-emotion/README.md @@ -10,7 +10,7 @@ This is based off the with-glamorous example. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-emotion) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-env-from-next-config-js/README.md b/examples/with-env-from-next-config-js/README.md index c78fd84dd4d8..3e201c22f628 100644 --- a/examples/with-env-from-next-config-js/README.md +++ b/examples/with-env-from-next-config-js/README.md @@ -14,7 +14,7 @@ app as `process.env.RESTURL_SPEAKERS`. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-env-from-next-config-js) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-env-from-next-config-js) ## How to use @@ -47,7 +47,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). > ## Special note > diff --git a/examples/with-external-styled-jsx-sass/README.md b/examples/with-external-styled-jsx-sass/README.md index 23773fb819e5..beb24d38dc59 100644 --- a/examples/with-external-styled-jsx-sass/README.md +++ b/examples/with-external-styled-jsx-sass/README.md @@ -6,7 +6,7 @@ This example features an app with external CSS written in SASS and loaded and au Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-external-styled-jsx-sass) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-external-styled-jsx-sass) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-fela/README.md b/examples/with-fela/README.md index c6182d6e85f2..ade6402bf83d 100755 --- a/examples/with-fela/README.md +++ b/examples/with-fela/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-fela) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-fela) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-firebase-authentication-serverless/README.md b/examples/with-firebase-authentication-serverless/README.md index 5166b6178c48..fac5e3d3d409 100644 --- a/examples/with-firebase-authentication-serverless/README.md +++ b/examples/with-firebase-authentication-serverless/README.md @@ -38,7 +38,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). After deploying, copy the deployment URL and navigate to your Firebase project's Authentication tab. Scroll down in the page to "Authorized domains" and add that URL to the list. diff --git a/examples/with-firebase-authentication/README.md b/examples/with-firebase-authentication/README.md index f43da148d4fe..7067953fc7ca 100644 --- a/examples/with-firebase-authentication/README.md +++ b/examples/with-firebase-authentication/README.md @@ -52,6 +52,6 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). After deploying, copy the deployment URL and navigate to your Firebase project's Authentication tab. Scroll down in the page to "Authorized domains" and add that URL to the list. diff --git a/examples/with-firebase-cloud-messaging/README.md b/examples/with-firebase-cloud-messaging/README.md index 8605e1004db0..bad837539f6f 100644 --- a/examples/with-firebase-cloud-messaging/README.md +++ b/examples/with-firebase-cloud-messaging/README.md @@ -37,7 +37,7 @@ yarn dev set your `messagingSenderId` in `static/firebase-messaging-sw.js` and `utils/webPush.js` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## How to send a notification diff --git a/examples/with-flow/README.md b/examples/with-flow/README.md index 93cf465ba0f0..68af0cf738cb 100644 --- a/examples/with-flow/README.md +++ b/examples/with-flow/README.md @@ -6,7 +6,7 @@ This example shows how you can use Flow, with the transform-flow-strip-types bab Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-flow) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-flow) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-framer-motion/README.md b/examples/with-framer-motion/README.md index ee9ffc20915c..7440b689c099 100644 --- a/examples/with-framer-motion/README.md +++ b/examples/with-framer-motion/README.md @@ -8,7 +8,7 @@ When using Next's `` component, you will likely want to [disable the defau Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-framer-motion) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-framer-motion) ## How to use @@ -39,4 +39,4 @@ npm run build npm start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-freactal/README.md b/examples/with-freactal/README.md index 02baeda05343..4b27bfdd0b0d 100644 --- a/examples/with-freactal/README.md +++ b/examples/with-freactal/README.md @@ -8,7 +8,7 @@ When it comes to state management of the React webapp, Redux is the most popular Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-freactal) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-freactal) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### example app diff --git a/examples/with-glamor/README.md b/examples/with-glamor/README.md index dd8358a5991d..948b3c783928 100644 --- a/examples/with-glamor/README.md +++ b/examples/with-glamor/README.md @@ -10,7 +10,7 @@ In this example a custom React.createElement is used. With the help of a babel p Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-glamor) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-glamor) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-glamorous/README.md b/examples/with-glamorous/README.md index 57bbe83a09c8..9a8146ec1703 100644 --- a/examples/with-glamorous/README.md +++ b/examples/with-glamorous/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-google-analytics-amp/README.md b/examples/with-google-analytics-amp/README.md index 1da4b87daa6d..e5710f2fc22f 100644 --- a/examples/with-google-analytics-amp/README.md +++ b/examples/with-google-analytics-amp/README.md @@ -6,7 +6,7 @@ This example shows how to use [Next.js](https://github.com/zeit/next.js) along w Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-google-analytics-amp) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-google-analytics-amp) ## How to use @@ -36,4 +36,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-google-analytics/README.md b/examples/with-google-analytics/README.md index 58a857007cc3..7a03a80eb68e 100644 --- a/examples/with-google-analytics/README.md +++ b/examples/with-google-analytics/README.md @@ -6,7 +6,7 @@ This example shows how to use [Next.js](https://github.com/zeit/next.js) along w Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-google-analytics) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-google-analytics) ## How to use @@ -36,4 +36,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-graphql-faunadb/README.md b/examples/with-graphql-faunadb/README.md index 9db1f9fc5905..17f3e9b93d6e 100644 --- a/examples/with-graphql-faunadb/README.md +++ b/examples/with-graphql-faunadb/README.md @@ -6,7 +6,7 @@ This simple Guestbook SPA example shows you how to use [FaunaDB's GraphQL endpoi Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-faunadb) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-faunadb) ## Why FaunaDB @@ -67,4 +67,4 @@ Make sure to leave us a guestbook message in our [live demo](https://with-graphq ### Deploy -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-graphql-hooks/README.md b/examples/with-graphql-hooks/README.md index d3080545a629..3165e980a6a6 100644 --- a/examples/with-graphql-hooks/README.md +++ b/examples/with-graphql-hooks/README.md @@ -10,7 +10,7 @@ This started life as a copy of the `with-apollo` example. We then stripped out A Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-hooks) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-hooks) _Live Example: https://next-with-graphql-hooks.now.sh_ @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-graphql-react/README.md b/examples/with-graphql-react/README.md index 1a90b7773fc0..52757e59d5fd 100644 --- a/examples/with-graphql-react/README.md +++ b/examples/with-graphql-react/README.md @@ -6,7 +6,7 @@ Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-react) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-graphql-react) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-grommet/README.md b/examples/with-grommet/README.md index ca2cb0b60e50..ea76cd57b744 100644 --- a/examples/with-grommet/README.md +++ b/examples/with-grommet/README.md @@ -8,7 +8,7 @@ It works by extending the `` to enable server-side rendering of `sty Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-grommet) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-grommet) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Try it on CodeSandbox diff --git a/examples/with-hashed-statics/README.md b/examples/with-hashed-statics/README.md index 6bdb3c848a3f..63dbfe46acd5 100644 --- a/examples/with-hashed-statics/README.md +++ b/examples/with-hashed-statics/README.md @@ -8,7 +8,7 @@ This example supports `.svg`, `.png` and `.txt` extensions, but it can be config Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-hashed-statics) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-hashed-statics) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-higher-order-component/README.md b/examples/with-higher-order-component/README.md index fb64d155b16c..f56146bca7cf 100644 --- a/examples/with-higher-order-component/README.md +++ b/examples/with-higher-order-component/README.md @@ -6,7 +6,7 @@ This example show you how to create Higher Order Component in next.js. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-higher-order-component) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-higher-order-component) ## How to use @@ -40,4 +40,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-http2/README.md b/examples/with-http2/README.md index 7e945481db7c..1115beeaa8b0 100644 --- a/examples/with-http2/README.md +++ b/examples/with-http2/README.md @@ -40,4 +40,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-immutable-redux-wrapper/README.md b/examples/with-immutable-redux-wrapper/README.md index 65234f7d0f27..ea68fcfcd7ef 100644 --- a/examples/with-immutable-redux-wrapper/README.md +++ b/examples/with-immutable-redux-wrapper/README.md @@ -8,7 +8,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-immutable-redux-wrapper) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-immutable-redux-wrapper) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-ioc/README.md b/examples/with-ioc/README.md index 3a35c2602ab7..7bd2590d4de3 100644 --- a/examples/with-ioc/README.md +++ b/examples/with-ioc/README.md @@ -37,4 +37,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap b/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap index 523644d734ca..b977552dad1b 100644 --- a/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap +++ b/examples/with-jest/__tests__/__snapshots__/snapshot.js.snap @@ -8,7 +8,7 @@ exports[`renders homepage unchanged 1`] = `

- Welcome to + Welcome to @@ -18,7 +18,7 @@ exports[`renders homepage unchanged 1`] = `

- Get started by editing + Get started by editing pages/index.js @@ -61,7 +61,7 @@ exports[`renders homepage unchanged 1`] = `

Deploy → @@ -78,7 +78,7 @@ exports[`renders homepage unchanged 1`] = ` rel="noopener noreferrer" target="_blank" > - Powered by + Powered by ZEIT Logo (

Discover and deploy boilerplate example Next.js projects.

- +

Deploy →

Instantly deploy your Next.js site to a public URL with ZEIT Now. diff --git a/examples/with-kea/README.md b/examples/with-kea/README.md index 64629bc0c546..9d5dd9553294 100644 --- a/examples/with-kea/README.md +++ b/examples/with-kea/README.md @@ -6,7 +6,7 @@ This example uses [kea](https://github.com/keajs/kea). Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-kea) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-kea) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-linaria/README.md b/examples/with-linaria/README.md index 0ef6a6ed05c7..e5208b01dbff 100644 --- a/examples/with-linaria/README.md +++ b/examples/with-linaria/README.md @@ -8,7 +8,7 @@ We are creating three `div` elements with custom styles being shared across the Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-linaria) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-linaria) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-lingui/README.md b/examples/with-lingui/README.md index 2a1feac7b1e9..e63b98517213 100644 --- a/examples/with-lingui/README.md +++ b/examples/with-lingui/README.md @@ -10,7 +10,7 @@ The example also uses a Higher order Component which can be added to all pages w Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-lingui) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-lingui) ## How to use @@ -43,7 +43,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### How to add more translated strings diff --git a/examples/with-loading/README.md b/examples/with-loading/README.md index 16a3a20dc304..7573404122cd 100644 --- a/examples/with-loading/README.md +++ b/examples/with-loading/README.md @@ -14,7 +14,7 @@ It features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-loading) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-loading) ## How to use @@ -47,4 +47,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-markdown/README.md b/examples/with-markdown/README.md index 18b55d21a7a4..9be5c840d325 100644 --- a/examples/with-markdown/README.md +++ b/examples/with-markdown/README.md @@ -6,7 +6,7 @@ This example shows how to integrate an [MDX](https://github.com/mdx-js/mdx) whic Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-markdown) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-markdown) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-mdx/README.md b/examples/with-mdx/README.md index ea8713e308ba..68390e5523e0 100644 --- a/examples/with-mdx/README.md +++ b/examples/with-mdx/README.md @@ -6,7 +6,7 @@ This example shows using [MDX](https://github.com/mdx-js/mdx) as top level pages Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mdx) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mdx) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-mobx-keystone-typescript/README.md b/examples/with-mobx-keystone-typescript/README.md index a79916185b14..780048de3dbb 100644 --- a/examples/with-mobx-keystone-typescript/README.md +++ b/examples/with-mobx-keystone-typescript/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-keystone-typescript) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-keystone-typescript) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-mobx-keystone-typescript/components/Clock.tsx b/examples/with-mobx-keystone-typescript/components/Clock.tsx index 5b2ccb69b0cf..08191459605d 100644 --- a/examples/with-mobx-keystone-typescript/components/Clock.tsx +++ b/examples/with-mobx-keystone-typescript/components/Clock.tsx @@ -16,9 +16,7 @@ const Clock: FC = props => { font: '50px menlo, monaco, monospace', padding: '15px', } - return ( -

{format(new Date(props.lastUpdate as number))}
- ) + return
{format(props.lastUpdate)}
} export { Clock } diff --git a/examples/with-mobx-keystone-typescript/package.json b/examples/with-mobx-keystone-typescript/package.json index b481e5938413..b90de6fadc25 100644 --- a/examples/with-mobx-keystone-typescript/package.json +++ b/examples/with-mobx-keystone-typescript/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "mobx": "^5.15.1", - "mobx-keystone": "^0.30.0", + "mobx-keystone": "^0.41.0", "mobx-react-lite": "^1.5.2", "next": "latest", "react": "^16.12.0", diff --git a/examples/with-mobx-keystone-typescript/store/root.ts b/examples/with-mobx-keystone-typescript/store/root.ts index a9da845051f6..72e142dae6ce 100644 --- a/examples/with-mobx-keystone-typescript/store/root.ts +++ b/examples/with-mobx-keystone-typescript/store/root.ts @@ -1,16 +1,19 @@ -import { Model, model, prop, modelAction, timestampAsDate } from 'mobx-keystone' +import { + Model, + model, + prop, + modelAction, + prop_dateTimestamp, +} from 'mobx-keystone' @model('store/root') class RootStore extends Model({ foo: prop(0), - lastUpdate: prop(new Date().getTime()), + lastUpdate: prop_dateTimestamp(() => new Date()), light: prop(false), }) { timer!: ReturnType - @timestampAsDate('lastUpdate') - lastUpdateDate!: Date - @modelAction start() { this.timer = setInterval(() => { @@ -19,7 +22,7 @@ class RootStore extends Model({ } @modelAction update() { - this.lastUpdate = Date.now() + this.lastUpdate = new Date() this.light = true } diff --git a/examples/with-mobx-react-lite/README.md b/examples/with-mobx-react-lite/README.md index 57dd6da7d23d..c3af1b9fc7a2 100644 --- a/examples/with-mobx-react-lite/README.md +++ b/examples/with-mobx-react-lite/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-react-lite) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-react-lite) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-mobx-state-tree-typescript/README.md b/examples/with-mobx-state-tree-typescript/README.md index 30f4609795ff..5d3d818844d1 100644 --- a/examples/with-mobx-state-tree-typescript/README.md +++ b/examples/with-mobx-state-tree-typescript/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-state-tree-typescript) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-state-tree-typescript) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-mobx-state-tree/README.md b/examples/with-mobx-state-tree/README.md index ef83a00d7025..2a0721a5f0d4 100644 --- a/examples/with-mobx-state-tree/README.md +++ b/examples/with-mobx-state-tree/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-state-tree) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx-state-tree) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-mobx/README.md b/examples/with-mobx/README.md index 806d0a236611..62ae351a5619 100644 --- a/examples/with-mobx/README.md +++ b/examples/with-mobx/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-mobx) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-netlify-cms/README.md b/examples/with-netlify-cms/README.md index bc88e0e9dcc8..e95812cf37e8 100644 --- a/examples/with-netlify-cms/README.md +++ b/examples/with-netlify-cms/README.md @@ -33,7 +33,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## How it works diff --git a/examples/with-next-css/README.md b/examples/with-next-css/README.md index d462629b03bd..c2460f1e14c8 100644 --- a/examples/with-next-css/README.md +++ b/examples/with-next-css/README.md @@ -6,7 +6,7 @@ This example demonstrates how to use Next.js' built-in CSS imports and CSS modul Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-css) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-css) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-less/README.md b/examples/with-next-less/README.md index d0051f8c7f17..64831b215056 100644 --- a/examples/with-next-less/README.md +++ b/examples/with-next-less/README.md @@ -8,7 +8,7 @@ It includes patterns for with and without CSS Modules, with PostCSS and with add Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-less) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-less) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-offline/README.md b/examples/with-next-offline/README.md index ea3bc829913e..4fa6c12fdc5d 100644 --- a/examples/with-next-offline/README.md +++ b/examples/with-next-offline/README.md @@ -65,4 +65,4 @@ yarn start ### Deploy -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-page-transitions/README.md b/examples/with-next-page-transitions/README.md index b7b0c321e7a1..0149def9a2c9 100644 --- a/examples/with-next-page-transitions/README.md +++ b/examples/with-next-page-transitions/README.md @@ -8,7 +8,7 @@ This example includes two pages with links between them. The "About" page demons Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-page-transitions) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-page-transitions) ## How to use @@ -39,4 +39,4 @@ npm run build npm start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-routes/README.md b/examples/with-next-routes/README.md index d4825848fea7..6e12b63c99c1 100644 --- a/examples/with-next-routes/README.md +++ b/examples/with-next-routes/README.md @@ -35,4 +35,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-sass/README.md b/examples/with-next-sass/README.md index 74a6e9540fbb..60ef149c54ac 100644 --- a/examples/with-next-sass/README.md +++ b/examples/with-next-sass/README.md @@ -6,7 +6,7 @@ This example uses next-sass without css-modules. The config can be found in `nex Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-sass) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-sass) ## How to use @@ -49,4 +49,4 @@ yarn build yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-next-seo/README.md b/examples/with-next-seo/README.md index 692dfc3a1887..d7c6b2323962 100644 --- a/examples/with-next-seo/README.md +++ b/examples/with-next-seo/README.md @@ -6,7 +6,7 @@ This example shows how you integrate [next-seo](https://github.com/garmeeh/next- Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-seo) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-next-seo) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-noscript/README.md b/examples/with-noscript/README.md index 9bc59cf84834..e52fdd106743 100644 --- a/examples/with-noscript/README.md +++ b/examples/with-noscript/README.md @@ -6,7 +6,7 @@ This example show you how to use `` with image resource in Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-noscript) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-noscript) ## How to use @@ -63,4 +63,4 @@ yarn run build yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-now-env/README.md b/examples/with-now-env/README.md index 820ec576bb23..f51ca7892340 100644 --- a/examples/with-now-env/README.md +++ b/examples/with-now-env/README.md @@ -37,6 +37,6 @@ Start the development server with [now](https://zeit.co/now) ([download](https:/ now dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). Keep in mind that in order to deploy the app to ZEIT Now the env [secrets](https://zeit.co/docs/getting-started/secrets) defined in `now.json` should be listed in your account. diff --git a/examples/with-office-ui-fabric-react/README.md b/examples/with-office-ui-fabric-react/README.md index c8fe9ee26fd0..7522e8bf686e 100644 --- a/examples/with-office-ui-fabric-react/README.md +++ b/examples/with-office-ui-fabric-react/README.md @@ -33,4 +33,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-orbit-components/README.md b/examples/with-orbit-components/README.md index 96fd9cf091a8..ea81abb576f4 100644 --- a/examples/with-orbit-components/README.md +++ b/examples/with-orbit-components/README.md @@ -10,7 +10,7 @@ This fork comes from [styled-components-example](https://github.com/zeit/next.js Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-orbit-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-orbit-components) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-overmind/README.md b/examples/with-overmind/README.md index 5f7faf27e9aa..fa8d300e0d39 100644 --- a/examples/with-overmind/README.md +++ b/examples/with-overmind/README.md @@ -6,7 +6,7 @@ This example uses [overmind](https://overmindjs.org/?view=react&typescript=false Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-overmind) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-overmind) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-patternfly/README.md b/examples/with-patternfly/README.md index ca8cae909af9..1cc904f8f5d5 100644 --- a/examples/with-patternfly/README.md +++ b/examples/with-patternfly/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Patterfly](https://www.pattern Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-patternfly) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-patternfly) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-pkg/README.md b/examples/with-pkg/README.md index 681fe9f96dea..1d448254c3e2 100644 --- a/examples/with-pkg/README.md +++ b/examples/with-pkg/README.md @@ -39,4 +39,4 @@ Execute the binary file: PORT=4000 ./dist/with-pkg-macos ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-polyfills/README.md b/examples/with-polyfills/README.md index e0dfcd78f6e3..a92e32e4d820 100644 --- a/examples/with-polyfills/README.md +++ b/examples/with-polyfills/README.md @@ -8,7 +8,7 @@ This how you can do it easily with Next.js's custom webpack config feature. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-polyfills) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-polyfills) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-portals-ssr/README.md b/examples/with-portals-ssr/README.md index 3a72c6fc5887..d83111ec9e56 100644 --- a/examples/with-portals-ssr/README.md +++ b/examples/with-portals-ssr/README.md @@ -6,7 +6,7 @@ An example of Server Side Rendered React [Portals](https://reactjs.org/docs/port Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-portals-ssr) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-portals-ssr) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-portals/README.md b/examples/with-portals/README.md index 116298d28635..2b474138ce0c 100644 --- a/examples/with-portals/README.md +++ b/examples/with-portals/README.md @@ -6,7 +6,7 @@ This example show how to use the React [Portals](https://reactjs.org/docs/portal Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-portals) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-portals) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-prefetching/README.md b/examples/with-prefetching/README.md index 0e90df63a20b..923ec1e1b123 100644 --- a/examples/with-prefetching/README.md +++ b/examples/with-prefetching/README.md @@ -10,7 +10,7 @@ This example features an app with four simple pages: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-prefetching) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-prefetching) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-pretty-url-routing/README.md b/examples/with-pretty-url-routing/README.md index f271efd5677f..050ab3ef69fe 100644 --- a/examples/with-pretty-url-routing/README.md +++ b/examples/with-pretty-url-routing/README.md @@ -36,4 +36,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-quill-js/README.md b/examples/with-quill-js/README.md index dde1727ef084..ccfd1ece46a7 100644 --- a/examples/with-quill-js/README.md +++ b/examples/with-quill-js/README.md @@ -8,7 +8,7 @@ Quill does not suppport SSR, so it's only loaded and rendered in the browser. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-quill-js) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-quill-js) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-rbx-bulma-pro/README.md b/examples/with-rbx-bulma-pro/README.md index dd86e698a535..a2e99cffcaac 100644 --- a/examples/with-rbx-bulma-pro/README.md +++ b/examples/with-rbx-bulma-pro/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [rbx](https://github.com/dfee/r Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rbx-bulma-pro) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rbx-bulma-pro) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-ga/README.md b/examples/with-react-ga/README.md index 74fcd7986789..3f96cf64fb49 100644 --- a/examples/with-react-ga/README.md +++ b/examples/with-react-ga/README.md @@ -7,7 +7,7 @@ component with NextJs. Modify `Tracking ID` in `utils/analytics.js` file for tes Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-ga) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-ga) ## How to use @@ -40,4 +40,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-helmet/README.md b/examples/with-react-helmet/README.md index e6d28f4adf82..cb1ddff8e8dc 100644 --- a/examples/with-react-helmet/README.md +++ b/examples/with-react-helmet/README.md @@ -9,7 +9,7 @@ The rest is all up to you. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-helmet) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-helmet) ## How to use @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-intl/README.md b/examples/with-react-intl/README.md index b046a181db3e..a26ee7123292 100644 --- a/examples/with-react-intl/README.md +++ b/examples/with-react-intl/README.md @@ -33,7 +33,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Features of this example app diff --git a/examples/with-react-jss/README.md b/examples/with-react-jss/README.md index 6bf4d7a27956..0ae1574bb21f 100644 --- a/examples/with-react-jss/README.md +++ b/examples/with-react-jss/README.md @@ -8,7 +8,7 @@ The critical styles will be injected into the head when server rendered. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-jss) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-jss) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-md/README.md b/examples/with-react-md/README.md index 3590a7ffe6ed..12d0a8e7e666 100644 --- a/examples/with-react-md/README.md +++ b/examples/with-react-md/README.md @@ -10,7 +10,7 @@ I recommend reading [layout-component](../layout-component) example next to lear Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-md) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-md) ## How to use @@ -45,4 +45,4 @@ ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css public yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-multi-carousel/README.md b/examples/with-react-multi-carousel/README.md index 1d1d493a6bb7..be249f5792ad 100644 --- a/examples/with-react-multi-carousel/README.md +++ b/examples/with-react-multi-carousel/README.md @@ -6,7 +6,7 @@ Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-multi-carousel) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-multi-carousel) _Live Example: https://react-multi-carousel.now.sh_ @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## How does it work with ssr? diff --git a/examples/with-react-native-web/README.md b/examples/with-react-native-web/README.md index cac6c0fac01c..7a3148770181 100644 --- a/examples/with-react-native-web/README.md +++ b/examples/with-react-native-web/README.md @@ -10,7 +10,7 @@ This example features how to use [react-native-web](https://github.com/necolas/r Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-native-web) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-native-web) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-relay-network-modern/README.md b/examples/with-react-relay-network-modern/README.md index 986d3056e001..f00190e0866e 100644 --- a/examples/with-react-relay-network-modern/README.md +++ b/examples/with-react-relay-network-modern/README.md @@ -10,7 +10,7 @@ This example relies on [graph.cool](https://www.graph.cool) for its GraphQL back Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-relay-network-modern) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-relay-network-modern) ## How to use @@ -65,4 +65,4 @@ npm run dev yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-toolbox/README.md b/examples/with-react-toolbox/README.md index 86bf473a83c1..e4017fa93fb0 100644 --- a/examples/with-react-toolbox/README.md +++ b/examples/with-react-toolbox/README.md @@ -8,7 +8,7 @@ For actual use, you probably also want to add Roboto Font, and Material Design I Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-toolbox) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-toolbox) ## How to use @@ -43,4 +43,4 @@ yarn dev Notice that `yarn toolbox` (or `npm run toolbox`) should be rerun every time the `"reactToolbox"` configuration in `package.json` is changed, in order to update `/theme.js` and `public/theme.css`. The `"reactToolbox"` configuration includes styling, and the list of react-toolbox components to include. -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-useragent/README.md b/examples/with-react-useragent/README.md index ec5777a8c195..153d3efc8812 100644 --- a/examples/with-react-useragent/README.md +++ b/examples/with-react-useragent/README.md @@ -13,7 +13,7 @@ The example uses the `pages/_app.js` file to automatically inject user-agent det Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-useragent) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-useragent) ## How to use @@ -46,4 +46,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-uwp/README.md b/examples/with-react-uwp/README.md index f8ae5c42a05d..3db8104a06ca 100644 --- a/examples/with-react-uwp/README.md +++ b/examples/with-react-uwp/README.md @@ -6,7 +6,7 @@ This example features how you use [react-uwp](https://github.com/myxvisual/react Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-uwp) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-uwp) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-react-with-styles/README.md b/examples/with-react-with-styles/README.md index d5fcf54360d0..a23c3f1ac897 100644 --- a/examples/with-react-with-styles/README.md +++ b/examples/with-react-with-styles/README.md @@ -12,7 +12,7 @@ We are using `pages/_index.js` from this example [with-aphrodite](https://github Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-with-styles) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-react-with-styles) ## How to use @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-reasonml-todo/README.md b/examples/with-reasonml-todo/README.md index 78165889e331..a130a44180fc 100644 --- a/examples/with-reasonml-todo/README.md +++ b/examples/with-reasonml-todo/README.md @@ -18,7 +18,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reasonml-todo) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reasonml-todo) ## How to use @@ -61,7 +61,7 @@ yarn build yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Recommendation: diff --git a/examples/with-reasonml/README.md b/examples/with-reasonml/README.md index cff3b1b1577c..489d2db2cf3e 100644 --- a/examples/with-reasonml/README.md +++ b/examples/with-reasonml/README.md @@ -12,7 +12,7 @@ This example features: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reasonml) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reasonml) ## How to use @@ -55,7 +55,7 @@ yarn build yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Recommendation: diff --git a/examples/with-rebass/README.md b/examples/with-rebass/README.md index 0efb499fcd33..d12d42c7061d 100644 --- a/examples/with-rebass/README.md +++ b/examples/with-rebass/README.md @@ -8,7 +8,7 @@ This example features how you use [Rebass](http://jxnblk.com/rebass/) functional Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rebass) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rebass) ## How to use @@ -43,4 +43,4 @@ ln -f -s ../node_modules/react-md/dist/react-md.light_blue-yellow.min.css static yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-recompose/README.md b/examples/with-recompose/README.md index 876fbcab4412..04317f1c4640 100644 --- a/examples/with-recompose/README.md +++ b/examples/with-recompose/README.md @@ -8,7 +8,7 @@ It also configure Babel to change our recompose imports so we're going to actual Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-recompose) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-recompose) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-redux-code-splitting/README.md b/examples/with-redux-code-splitting/README.md index 35e296e338a9..652ec7974af3 100644 --- a/examples/with-redux-code-splitting/README.md +++ b/examples/with-redux-code-splitting/README.md @@ -8,7 +8,7 @@ This example utilizes [fast-redux](https://github.com/dogada/fast-redux) to spli Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-code-splitting) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-code-splitting) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-redux-observable/README.md b/examples/with-redux-observable/README.md index 0278ed2fb0dc..a10d995a43b5 100644 --- a/examples/with-redux-observable/README.md +++ b/examples/with-redux-observable/README.md @@ -12,7 +12,7 @@ Example also uses `redux-logger` to log every action. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-observable) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-observable) ## How to use @@ -45,7 +45,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Notes diff --git a/examples/with-redux-persist/README.md b/examples/with-redux-persist/README.md index 329a09003d93..d4c42213c4ae 100644 --- a/examples/with-redux-persist/README.md +++ b/examples/with-redux-persist/README.md @@ -8,7 +8,7 @@ With the advantage of having a global state for your app using `redux`. You'll a Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-persist) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-persist) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-redux-reselect-recompose/README.md b/examples/with-redux-reselect-recompose/README.md index 8c4e43db6eee..a8ce68377be0 100644 --- a/examples/with-redux-reselect-recompose/README.md +++ b/examples/with-redux-reselect-recompose/README.md @@ -6,7 +6,7 @@ This example is based on the great work of [with-redux](https://github.com/zeit/ Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-reselect-recompose) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-reselect-recompose) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-redux-saga/README.md b/examples/with-redux-saga/README.md index 696029f4d76b..927bd90c978a 100644 --- a/examples/with-redux-saga/README.md +++ b/examples/with-redux-saga/README.md @@ -8,7 +8,7 @@ Usually splitting your app state into `pages` feels natural, but sometimes you'l Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-saga) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-saga) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-redux-thunk/README.md b/examples/with-redux-thunk/README.md index 81929373b263..c8533d44a739 100644 --- a/examples/with-redux-thunk/README.md +++ b/examples/with-redux-thunk/README.md @@ -8,7 +8,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-thunk) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-thunk) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-redux-wrapper/README.md b/examples/with-redux-wrapper/README.md index 4bd166e92a32..536995626f76 100644 --- a/examples/with-redux-wrapper/README.md +++ b/examples/with-redux-wrapper/README.md @@ -6,7 +6,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-wrapper) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux-wrapper) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-redux/README.md b/examples/with-redux/README.md index 029b8ffea07b..ff47603c9b25 100644 --- a/examples/with-redux/README.md +++ b/examples/with-redux/README.md @@ -8,7 +8,7 @@ Usually splitting your app state into `pages` feels natural but sometimes you'll Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-redux) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-reflux/README.md b/examples/with-reflux/README.md index 2c08614a2e91..10b14d3fa007 100644 --- a/examples/with-reflux/README.md +++ b/examples/with-reflux/README.md @@ -6,7 +6,7 @@ Use [reflux](https://github.com/reflux/refluxjs) to manage an application store Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reflux) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-reflux) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-refnux/README.md b/examples/with-refnux/README.md index cc7d8a32e8be..79c2475b047b 100644 --- a/examples/with-refnux/README.md +++ b/examples/with-refnux/README.md @@ -7,7 +7,7 @@ In this case we are using [refnux](https://github.com/algesten/refnux) which is Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-refnux) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-refnux) ## How to use @@ -40,7 +40,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-relay-modern-server-express/README.md b/examples/with-relay-modern-server-express/README.md index dad55edb9f7d..38f4c6d229c2 100644 --- a/examples/with-relay-modern-server-express/README.md +++ b/examples/with-relay-modern-server-express/README.md @@ -43,4 +43,4 @@ npm run dev yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-relay-modern/README.md b/examples/with-relay-modern/README.md index 1dee3de8f5f8..30dd65e7b511 100644 --- a/examples/with-relay-modern/README.md +++ b/examples/with-relay-modern/README.md @@ -10,7 +10,7 @@ This example relies on [graph.cool](https://www.graph.cool) for its GraphQL back Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-relay-modern) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-relay-modern) ## How to use @@ -65,4 +65,4 @@ npm run dev yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-rematch/README.md b/examples/with-rematch/README.md index 43a086aff225..c36cb49c6018 100644 --- a/examples/with-rematch/README.md +++ b/examples/with-rematch/README.md @@ -8,7 +8,7 @@ Since rematch is utility which uses redux under the hood, some elements like `st Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rematch) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-rematch) ## How to use @@ -38,7 +38,7 @@ npm install npm run dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Directory structure diff --git a/examples/with-segment-analytics/README.md b/examples/with-segment-analytics/README.md index adfdec8df784..c751c2cbe1ba 100644 --- a/examples/with-segment-analytics/README.md +++ b/examples/with-segment-analytics/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Segment Analytics](https://seg Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-segment-analytics) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-segment-analytics) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-semantic-ui/README.md b/examples/with-semantic-ui/README.md index 1826722c669b..3dada759ec5e 100644 --- a/examples/with-semantic-ui/README.md +++ b/examples/with-semantic-ui/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Semantic UI React](http://reac Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-semantic-ui) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-semantic-ui) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-sentry-simple/README.md b/examples/with-sentry-simple/README.md index 5109f11dda06..e003c93a8789 100644 --- a/examples/with-sentry-simple/README.md +++ b/examples/with-sentry-simple/README.md @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## About Example diff --git a/examples/with-sentry/README.md b/examples/with-sentry/README.md index 11f74fa467e3..822dc2043657 100644 --- a/examples/with-sentry/README.md +++ b/examples/with-sentry/README.md @@ -34,7 +34,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Configuration diff --git a/examples/with-shallow-routing/README.md b/examples/with-shallow-routing/README.md index 8846cbcba7db..d1bbb1d38d8b 100644 --- a/examples/with-shallow-routing/README.md +++ b/examples/with-shallow-routing/README.md @@ -8,7 +8,7 @@ We do this passing the `shallow: true` option to `Router.push` or `Router.replac Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-shallow-routing) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-shallow-routing) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-sitemap-and-robots-express-server/README.md b/examples/with-sitemap-and-robots-express-server/README.md index 463a0f254f32..35af68521e8c 100644 --- a/examples/with-sitemap-and-robots-express-server/README.md +++ b/examples/with-sitemap-and-robots-express-server/README.md @@ -36,7 +36,7 @@ yarn yarn start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-slate/README.md b/examples/with-slate/README.md index a0f23c2bd4fa..6682c9ab4619 100644 --- a/examples/with-slate/README.md +++ b/examples/with-slate/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Slate.js](https://www.slatejs. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-slate) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-slate) ## How to use @@ -36,4 +36,4 @@ npm install npm run dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-stencil/README.md b/examples/with-stencil/README.md index 4d7ccc1a1873..7a111de7e7e2 100644 --- a/examples/with-stencil/README.md +++ b/examples/with-stencil/README.md @@ -4,7 +4,7 @@ Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-stencil) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-stencil) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). > Choose `packages/web-app` as root directory when deploying. diff --git a/examples/with-storybook/README.md b/examples/with-storybook/README.md index 552e328850e0..c0b53b2b14e8 100644 --- a/examples/with-storybook/README.md +++ b/examples/with-storybook/README.md @@ -49,4 +49,4 @@ npm run build-storybook yarn build-storybook ``` -You can use [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) to deploy Storybook. Specify `storybook-static` as the output directory. +You can use [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) to deploy Storybook. Specify `storybook-static` as the output directory. diff --git a/examples/with-strict-csp-hash/README.md b/examples/with-strict-csp-hash/README.md index 06d0cbb61ac0..72f3fda704b6 100644 --- a/examples/with-strict-csp-hash/README.md +++ b/examples/with-strict-csp-hash/README.md @@ -10,7 +10,7 @@ Note: There are still valid cases for using a nonce in case you need to inline s Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-strict-csp-hash) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-strict-csp-hash) ## How to use @@ -43,4 +43,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-strict-csp/README.md b/examples/with-strict-csp/README.md index bc381a4a4afa..10c8ed64fcac 100644 --- a/examples/with-strict-csp/README.md +++ b/examples/with-strict-csp/README.md @@ -35,4 +35,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-stripe-typescript/README.md b/examples/with-stripe-typescript/README.md index 43dab5b83022..1dc91ca0ae33 100644 --- a/examples/with-stripe-typescript/README.md +++ b/examples/with-stripe-typescript/README.md @@ -115,7 +115,7 @@ The CLI will print a webhook secret key to the console. Set `STRIPE_WEBHOOK_SECR ### Deploy -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). **Note**: You must add your Stripe secrets using the ZEIT Now CLI ([Download here](https://zeit.co/download)): diff --git a/examples/with-style-sheet/README.md b/examples/with-style-sheet/README.md index 2037c9b9a983..6751b3639c22 100644 --- a/examples/with-style-sheet/README.md +++ b/examples/with-style-sheet/README.md @@ -6,7 +6,7 @@ This example features an app using the [style-sheet](https://www.npmjs.com/packa Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-style-sheet) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-style-sheet) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-styled-components-rtl/README.md b/examples/with-styled-components-rtl/README.md index 8810848ee8b1..7be0a15a8f2a 100644 --- a/examples/with-styled-components-rtl/README.md +++ b/examples/with-styled-components-rtl/README.md @@ -6,7 +6,7 @@ This example shows how to use nextjs with right to left (RTL) styles using style Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-components-rtl) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-components-rtl) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-styled-components/README.md b/examples/with-styled-components/README.md index 8349727e6bb5..78fecbf2cadd 100644 --- a/examples/with-styled-components/README.md +++ b/examples/with-styled-components/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-components) ## How to use @@ -41,7 +41,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ### Try it on CodeSandbox diff --git a/examples/with-styled-jsx-plugins/README.md b/examples/with-styled-jsx-plugins/README.md index 21e9d7afa044..51536d44202a 100644 --- a/examples/with-styled-jsx-plugins/README.md +++ b/examples/with-styled-jsx-plugins/README.md @@ -12,7 +12,7 @@ More details about how plugins work can be found in the [styled-jsx readme](http Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-jsx-plugins) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-jsx-plugins) ## How to use @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-styled-jsx-scss/README.md b/examples/with-styled-jsx-scss/README.md index 9e1aeabac743..d7e3e810e1e5 100644 --- a/examples/with-styled-jsx-scss/README.md +++ b/examples/with-styled-jsx-scss/README.md @@ -12,7 +12,7 @@ More details about how plugins work can be found in the [styled-jsx readme](http Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-jsx-scss) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styled-jsx-scss) ## How to use @@ -45,4 +45,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-styletron/README.md b/examples/with-styletron/README.md index a77df2e882a0..a864ad69a314 100644 --- a/examples/with-styletron/README.md +++ b/examples/with-styletron/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styletron) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-styletron) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-sw-precache/README.md b/examples/with-sw-precache/README.md index 923a1a1cb9bb..20c08d40e01e 100644 --- a/examples/with-sw-precache/README.md +++ b/examples/with-sw-precache/README.md @@ -33,4 +33,4 @@ npm run build npm start ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-tailwindcss-emotion/README.md b/examples/with-tailwindcss-emotion/README.md index d56aa3fa65c1..2a6df61b6f51 100644 --- a/examples/with-tailwindcss-emotion/README.md +++ b/examples/with-tailwindcss-emotion/README.md @@ -6,7 +6,7 @@ This is an example of how you can add the tailwind CSS with Emotion.js in your w Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-tailwindcss-emotion) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-tailwindcss-emotion) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-tailwindcss/README.md b/examples/with-tailwindcss/README.md index d74f18eb99d5..e4e0794d726e 100644 --- a/examples/with-tailwindcss/README.md +++ b/examples/with-tailwindcss/README.md @@ -6,7 +6,7 @@ This is an example of using [Tailwind CSS](https://tailwindcss.com) in a Next.js Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-tailwindcss) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-tailwindcss) ## How to use @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-three-js/README.md b/examples/with-three-js/README.md index 84d5ea623604..4d96776f8a40 100644 --- a/examples/with-three-js/README.md +++ b/examples/with-three-js/README.md @@ -9,7 +9,7 @@ This example uses: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-three-js) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-three-js) ## How to use @@ -42,4 +42,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-ts-node/README.md b/examples/with-ts-node/README.md index b7a183ff58f1..fd14a555d6e4 100644 --- a/examples/with-ts-node/README.md +++ b/examples/with-ts-node/README.md @@ -34,4 +34,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-typescript-graphql/.gitignore b/examples/with-typescript-graphql/.gitignore index 764f8b238767..2433e795cd92 100644 --- a/examples/with-typescript-graphql/.gitignore +++ b/examples/with-typescript-graphql/.gitignore @@ -1 +1,3 @@ +.next +node_modules __generated__ diff --git a/examples/with-typescript-graphql/.graphql-let.yml b/examples/with-typescript-graphql/.graphql-let.yml index 12ab765d5784..a2b012ff8861 100644 --- a/examples/with-typescript-graphql/.graphql-let.yml +++ b/examples/with-typescript-graphql/.graphql-let.yml @@ -5,3 +5,4 @@ plugins: - typescript - typescript-operations - typescript-react-apollo +respectGitIgnore: true diff --git a/examples/with-typescript-graphql/README.md b/examples/with-typescript-graphql/README.md index 6e1f1b6703f5..a5ac37e268cb 100644 --- a/examples/with-typescript-graphql/README.md +++ b/examples/with-typescript-graphql/README.md @@ -18,7 +18,7 @@ const News: React.FC = () => { Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript-graphql) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript-graphql) ## How to use @@ -51,7 +51,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-typescript-graphql/lib/resolvers.ts b/examples/with-typescript-graphql/lib/resolvers.ts index 1bd9511549d6..59cdf0e90839 100644 --- a/examples/with-typescript-graphql/lib/resolvers.ts +++ b/examples/with-typescript-graphql/lib/resolvers.ts @@ -1,11 +1,9 @@ -import { IResolvers } from 'apollo-server-micro' +import { QueryResolvers } from './type-defs.graphqls' -const resolvers: IResolvers = { - Query: { - viewer(_parent, _args, _context, _info) { - return { id: 1, name: 'John Smith', status: 'cached' } - }, +const Query: Required = { + viewer(_parent, _args, _context, _info) { + return { id: String(1), name: 'John Smith', status: 'cached' } }, } -export default resolvers +export default { Query } diff --git a/examples/with-typescript-graphql/package.json b/examples/with-typescript-graphql/package.json index 17a3e19e3c0b..7d76a6b06a9d 100644 --- a/examples/with-typescript-graphql/package.json +++ b/examples/with-typescript-graphql/package.json @@ -18,20 +18,24 @@ "apollo-client": "2.6.8", "apollo-link-http": "1.5.16", "apollo-link-schema": "1.2.4", - "apollo-server-micro": "2.9.14", + "apollo-server-micro": "2.10.1", "apollo-utilities": "^1.3.3", - "graphql": "^14.5.8", - "graphql-tag": "^2.10.1", + "graphql": "^14.6.0", + "graphql-tag": "^2.10.3", "next": "latest", "react": "^16.12.0", "react-dom": "^16.12.0" }, "devDependencies": { - "@graphql-codegen/typescript": "^1.9.1", - "@graphql-codegen/typescript-operations": "^1.9.1", - "@graphql-codegen/typescript-react-apollo": "^1.9.1", - "@types/react": "^16.9.17", + "@graphql-codegen/cli": "1.12.2", + "@graphql-codegen/plugin-helpers": "1.12.2", + "@graphql-codegen/typescript": "^1.12.2", + "@graphql-codegen/typescript-operations": "^1.12.2", + "@graphql-codegen/typescript-react-apollo": "^1.12.2", + "@graphql-codegen/typescript-resolvers": "1.12.2", + "@types/react": "^16.9.22", + "@types/react-dom": "^16.9.5", "graphql-let": "0.x", - "typescript": "^3.7.4" + "typescript": "^3.8.2" } } diff --git a/examples/with-typescript-styled-components/README.md b/examples/with-typescript-styled-components/README.md index a345c40769f4..84566949a7ea 100644 --- a/examples/with-typescript-styled-components/README.md +++ b/examples/with-typescript-styled-components/README.md @@ -6,7 +6,7 @@ This is a really simple project that show the usage of Next.js with TypeScript a Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript-styled-components) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript-styled-components) ## How to use it? @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-typescript/README.md b/examples/with-typescript/README.md index 811c4d67a190..c803499fc74e 100644 --- a/examples/with-typescript/README.md +++ b/examples/with-typescript/README.md @@ -6,7 +6,7 @@ This is a really simple project that shows the usage of Next.js with TypeScript. Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typescript) ## How to use it? @@ -39,7 +39,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Notes diff --git a/examples/with-typestyle/README.md b/examples/with-typestyle/README.md index 97ab9d28cb5c..f624809838a3 100644 --- a/examples/with-typestyle/README.md +++ b/examples/with-typestyle/README.md @@ -8,7 +8,7 @@ For this purpose we are extending the `` and injecting the server si Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typestyle) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-typestyle) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-universal-configuration-build-time/README.md b/examples/with-universal-configuration-build-time/README.md index 7fefd5209a6a..c074f1c9f7f1 100644 --- a/examples/with-universal-configuration-build-time/README.md +++ b/examples/with-universal-configuration-build-time/README.md @@ -8,7 +8,7 @@ When you build your application the environment variable is transformed into a p Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-universal-configuration-build-time) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-universal-configuration-build-time) ## How to use @@ -41,7 +41,7 @@ yarn VARIABLE_EXAMPLE=next.js yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). ## Please note diff --git a/examples/with-universal-configuration-runtime/README.md b/examples/with-universal-configuration-runtime/README.md index 56cac5b16f46..4bf4939b6d2a 100644 --- a/examples/with-universal-configuration-runtime/README.md +++ b/examples/with-universal-configuration-runtime/README.md @@ -35,4 +35,4 @@ yarn API_URL='https://example.com' yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-unstated/README.md b/examples/with-unstated/README.md index 40c9c00cf5d8..05373bb17d3a 100644 --- a/examples/with-unstated/README.md +++ b/examples/with-unstated/README.md @@ -8,7 +8,7 @@ The "counter" shows you how to preserve state from server to client and share th Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-unstated) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-unstated) ## How to use @@ -41,4 +41,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-url-object-routing/README.md b/examples/with-url-object-routing/README.md index 533e264b8cd5..8424b6e7d7b4 100644 --- a/examples/with-url-object-routing/README.md +++ b/examples/with-url-object-routing/README.md @@ -35,4 +35,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-videojs/README.md b/examples/with-videojs/README.md index d6c2c3630978..25b8177f023c 100644 --- a/examples/with-videojs/README.md +++ b/examples/with-videojs/README.md @@ -6,7 +6,7 @@ This example shows how to use Next.js along with [Video.js](http://videojs.com) Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-videojs) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-videojs) ## How to use @@ -36,4 +36,4 @@ npm install npm run dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-webassembly/README.md b/examples/with-webassembly/README.md index af6b3d1274d4..12c893cb677f 100644 --- a/examples/with-webassembly/README.md +++ b/examples/with-webassembly/README.md @@ -37,4 +37,4 @@ yarn dev To compile `src/add.rs` to `add.wasm` use `npm run build-rust`. -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-xstate/README.md b/examples/with-xstate/README.md index 442445df1818..e05ee5728000 100644 --- a/examples/with-xstate/README.md +++ b/examples/with-xstate/README.md @@ -6,7 +6,7 @@ This example shows how to integrate XState in Next.js. For more info about XStat Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-xstate) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-xstate) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-yarn-workspaces/README.md b/examples/with-yarn-workspaces/README.md index 78162125e998..01bf8656849e 100644 --- a/examples/with-yarn-workspaces/README.md +++ b/examples/with-yarn-workspaces/README.md @@ -12,7 +12,7 @@ In this example we have three workspaces: Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-yarn-workspaces) ## How to use @@ -42,7 +42,7 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). > Choose `packages/web-app` as root directory when deploying. diff --git a/examples/with-zeit-fetch/README.md b/examples/with-zeit-fetch/README.md index 34d326c423f4..a26c2f467425 100644 --- a/examples/with-zeit-fetch/README.md +++ b/examples/with-zeit-fetch/README.md @@ -6,7 +6,7 @@ This example shows how to use [`@zeit/fetch`](https://npmjs.com/package/@zeit/fe Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-zeit-fetch) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-zeit-fetch) ## How to use @@ -39,4 +39,4 @@ yarn yarn dev ``` -Deploy it to the cloud with [ZEIT Now](https://zeit.co/new?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). +Deploy it to the cloud with [ZEIT Now](https://zeit.co/import?filter=next.js&utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/examples/with-zones/README.md b/examples/with-zones/README.md index a10e282471ba..091cfb927f3c 100644 --- a/examples/with-zones/README.md +++ b/examples/with-zones/README.md @@ -6,7 +6,7 @@ With Next.js you can use multiple apps as a single app using it's [multi-zones f Deploy the example using [ZEIT Now](https://zeit.co/now): -[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-zones) +[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/import/project?template=https://github.com/zeit/next.js/tree/canary/examples/with-zones) ## How to use diff --git a/lerna.json b/lerna.json index 653287e6c33e..16f7b566a72b 100644 --- a/lerna.json +++ b/lerna.json @@ -12,5 +12,5 @@ "registry": "https://registry.npmjs.org/" } }, - "version": "9.2.3-canary.8" + "version": "9.2.3-canary.12" } diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index a21354c2b185..964c2db771de 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.3-canary.8", + "version": "9.2.3-canary.12", "keywords": [ "react", "next", diff --git a/packages/create-next-app/templates/default/pages/index.js b/packages/create-next-app/templates/default/pages/index.js index 6952aff32072..b837299c1f45 100644 --- a/packages/create-next-app/templates/default/pages/index.js +++ b/packages/create-next-app/templates/default/pages/index.js @@ -36,7 +36,7 @@ const Home = () => (

Deploy →

diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json index 81fb4aae1577..1fbd0f861d5d 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.3-canary.8", + "version": "9.2.3-canary.12", "main": "index.js", "license": "MIT", "repository": { diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json index 270ba0441407..7e738971e6e1 100644 --- a/packages/next-mdx/package.json +++ b/packages/next-mdx/package.json @@ -1,6 +1,6 @@ { "name": "@next/mdx", - "version": "9.2.3-canary.8", + "version": "9.2.3-canary.12", "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 95c89aa4efcc..be4a9963fb26 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.3-canary.8", + "version": "9.2.3-canary.12", "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 bbbc2a215227..e6c68f5361de 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.3-canary.8", + "version": "9.2.3-canary.12", "nextjs": { "name": "Material UI", "required-env": [] diff --git a/packages/next-plugin-sentry/package.json b/packages/next-plugin-sentry/package.json index f49319e66997..8856bcab3352 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.3-canary.8", + "version": "9.2.3-canary.12", "nextjs": { "name": "Sentry", "required-env": [ diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json index f3e563872b38..84df2a082b10 100644 --- a/packages/next-polyfill-nomodule/package.json +++ b/packages/next-polyfill-nomodule/package.json @@ -1,6 +1,6 @@ { "name": "@next/polyfill-nomodule", - "version": "9.2.3-canary.8", + "version": "9.2.3-canary.12", "description": "A polyfill for non-dead, nomodule browsers.", "main": "dist/polyfill-nomodule.js", "license": "MIT", diff --git a/packages/next/README.md b/packages/next/README.md index eb677e47512d..1696181cd3d1 100644 --- a/packages/next/README.md +++ b/packages/next/README.md @@ -10,7 +10,7 @@
- +

diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 7eb4ccd70189..841f5472178b 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -113,21 +113,24 @@ export default async function build(dir: string, conf = null): Promise { const { target } = config const buildId = await generateBuildId(config.generateBuildId, nanoid) const distDir = path.join(dir, config.distDir) + const headers: Header[] = [] const rewrites: Rewrite[] = [] const redirects: Redirect[] = [] - const headers: Header[] = [] if (typeof config.experimental.redirects === 'function') { - redirects.push(...(await config.experimental.redirects())) - checkCustomRoutes(redirects, 'redirect') + const _redirects = await config.experimental.redirects() + checkCustomRoutes(_redirects, 'redirect') + redirects.push(..._redirects) } if (typeof config.experimental.rewrites === 'function') { - rewrites.push(...(await config.experimental.rewrites())) - checkCustomRoutes(rewrites, 'rewrite') + const _rewrites = await config.experimental.rewrites() + checkCustomRoutes(_rewrites, 'rewrite') + rewrites.push(..._rewrites) } if (typeof config.experimental.headers === 'function') { - headers.push(...(await config.experimental.headers())) - checkCustomRoutes(headers, 'header') + const _headers = await config.experimental.headers() + checkCustomRoutes(_headers, 'header') + headers.push(..._headers) } if (ciEnvironment.isCI) { diff --git a/packages/next/build/utils.ts b/packages/next/build/utils.ts index 06330a8aa982..8b9d19cb6978 100644 --- a/packages/next/build/utils.ts +++ b/packages/next/build/utils.ts @@ -497,6 +497,113 @@ export async function getPageSizeInKb( return [-1, -1] } +export async function buildStaticPaths( + page: string, + unstable_getStaticPaths: Unstable_getStaticPaths +): Promise> { + const prerenderPaths = new Set() + const _routeRegex = getRouteRegex(page) + const _routeMatcher = getRouteMatcher(_routeRegex) + + // Get the default list of allowed params. + const _validParamKeys = Object.keys(_routeMatcher(page)) + + const staticPathsResult = await unstable_getStaticPaths() + + const expectedReturnVal = + `Expected: { paths: [] }\n` + + `See here for more info: https://err.sh/zeit/next.js/invalid-getstaticpaths-value` + + if ( + !staticPathsResult || + typeof staticPathsResult !== 'object' || + Array.isArray(staticPathsResult) + ) { + throw new Error( + `Invalid value returned from unstable_getStaticPaths in ${page}. Received ${typeof staticPathsResult} ${expectedReturnVal}` + ) + } + + const invalidStaticPathKeys = Object.keys(staticPathsResult).filter( + key => key !== 'paths' + ) + + if (invalidStaticPathKeys.length > 0) { + throw new Error( + `Extra keys returned from unstable_getStaticPaths in ${page} (${invalidStaticPathKeys.join( + ', ' + )}) ${expectedReturnVal}` + ) + } + + const toPrerender = staticPathsResult.paths + + if (!Array.isArray(toPrerender)) { + throw new Error( + `Invalid \`paths\` value returned from unstable_getStaticProps in ${page}.\n` + + `\`paths\` must be an array of strings or objects of shape { params: [key: string]: string }` + ) + } + + toPrerender.forEach(entry => { + // For a string-provided path, we must make sure it matches the dynamic + // route. + if (typeof entry === 'string') { + const result = _routeMatcher(entry) + if (!result) { + throw new Error( + `The provided path \`${entry}\` does not match the page: \`${page}\`.` + ) + } + + prerenderPaths?.add(entry) + } + // For the object-provided path, we must make sure it specifies all + // required keys. + else { + const invalidKeys = Object.keys(entry).filter(key => key !== 'params') + if (invalidKeys.length) { + throw new Error( + `Additional keys were returned from \`unstable_getStaticPaths\` in page "${page}". ` + + `URL Parameters intended for this dynamic route must be nested under the \`params\` key, i.e.:` + + `\n\n\treturn { params: { ${_validParamKeys + .map(k => `${k}: ...`) + .join(', ')} } }` + + `\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.\n` + ) + } + + const { params = {} } = entry + let builtPage = page + _validParamKeys.forEach(validParamKey => { + const { repeat } = _routeRegex.groups[validParamKey] + const paramValue = params[validParamKey] + if ( + (repeat && !Array.isArray(paramValue)) || + (!repeat && typeof paramValue !== 'string') + ) { + throw new Error( + `A required parameter (${validParamKey}) was not provided as ${ + repeat ? 'an array' : 'a string' + } in unstable_getStaticPaths for ${page}` + ) + } + + builtPage = builtPage.replace( + `[${repeat ? '...' : ''}${validParamKey}]`, + repeat + ? (paramValue as string[]).map(encodeURIComponent).join('/') + : encodeURIComponent(paramValue as string) + ) + }) + + prerenderPaths?.add(builtPage) + } + }) + + return [...prerenderPaths] +} + export async function isPageStatic( page: string, serverBundle: string, @@ -559,115 +666,19 @@ export async function isPageStatic( ) } - let prerenderPaths: Set | undefined + let prerenderRoutes: Array | undefined if (hasStaticProps && hasStaticPaths) { - prerenderPaths = new Set() - - const _routeRegex = getRouteRegex(page) - const _routeMatcher = getRouteMatcher(_routeRegex) - - // Get the default list of allowed params. - const _validParamKeys = Object.keys(_routeMatcher(page)) - - const staticPathsResult = await (mod.unstable_getStaticPaths as Unstable_getStaticPaths)() - - const expectedReturnVal = - `Expected: { paths: [] }\n` + - `See here for more info: https://err.sh/zeit/next.js/invalid-getstaticpaths-value` - - if ( - !staticPathsResult || - typeof staticPathsResult !== 'object' || - Array.isArray(staticPathsResult) - ) { - throw new Error( - `Invalid value returned from unstable_getStaticPaths in ${page}. Received ${typeof staticPathsResult} ${expectedReturnVal}` - ) - } - - const invalidStaticPathKeys = Object.keys(staticPathsResult).filter( - key => key !== 'paths' + prerenderRoutes = await buildStaticPaths( + page, + mod.unstable_getStaticPaths ) - - if (invalidStaticPathKeys.length > 0) { - throw new Error( - `Extra keys returned from unstable_getStaticPaths in ${page} (${invalidStaticPathKeys.join( - ', ' - )}) ${expectedReturnVal}` - ) - } - - const toPrerender = staticPathsResult.paths - - if (!Array.isArray(toPrerender)) { - throw new Error( - `Invalid \`paths\` value returned from unstable_getStaticProps in ${page}.\n` + - `\`paths\` must be an array of strings or objects of shape { params: [key: string]: string }` - ) - } - - toPrerender.forEach(entry => { - // For a string-provided path, we must make sure it matches the dynamic - // route. - if (typeof entry === 'string') { - const result = _routeMatcher(entry) - if (!result) { - throw new Error( - `The provided path \`${entry}\` does not match the page: \`${page}\`.` - ) - } - - prerenderPaths?.add(entry) - } - // For the object-provided path, we must make sure it specifies all - // required keys. - else { - const invalidKeys = Object.keys(entry).filter(key => key !== 'params') - if (invalidKeys.length) { - throw new Error( - `Additional keys were returned from \`unstable_getStaticPaths\` in page "${page}". ` + - `URL Parameters intended for this dynamic route must be nested under the \`params\` key, i.e.:` + - `\n\n\treturn { params: { ${_validParamKeys - .map(k => `${k}: ...`) - .join(', ')} } }` + - `\n\nKeys that need to be moved: ${invalidKeys.join(', ')}.\n` - ) - } - - const { params = {} } = entry - let builtPage = page - _validParamKeys.forEach(validParamKey => { - const { repeat } = _routeRegex.groups[validParamKey] - const paramValue = params[validParamKey] - if ( - (repeat && !Array.isArray(paramValue)) || - (!repeat && typeof paramValue !== 'string') - ) { - throw new Error( - `A required parameter (${validParamKey}) was not provided as ${ - repeat ? 'an array' : 'a string' - } in unstable_getStaticPaths for ${page}` - ) - } - - builtPage = builtPage.replace( - `[${repeat ? '...' : ''}${validParamKey}]`, - repeat - ? (paramValue as string[]).map(encodeURIComponent).join('/') - : encodeURIComponent(paramValue as string) - ) - }) - - prerenderPaths?.add(builtPage) - } - }) } const config = mod.config || {} return { isStatic: !hasStaticProps && !hasGetInitialProps && !hasServerProps, isHybridAmp: config.amp === 'hybrid', - prerenderRoutes: prerenderPaths && [...prerenderPaths], + prerenderRoutes, hasStaticProps, hasServerProps, } diff --git a/packages/next/build/webpack/loaders/next-serverless-loader.ts b/packages/next/build/webpack/loaders/next-serverless-loader.ts index 7767ec05381f..6d92d5092494 100644 --- a/packages/next/build/webpack/loaders/next-serverless-loader.ts +++ b/packages/next/build/webpack/loaders/next-serverless-loader.ts @@ -206,7 +206,8 @@ const nextServerlessLoader: loader.Loader = function() { } const {parse} = require('url') const {parse: parseQs} = require('querystring') - const {renderToHTML} =require('next/dist/next-server/server/render'); + const {renderToHTML} = require('next/dist/next-server/server/render'); + const { tryGetPreviewData } = require('next/dist/next-server/server/api-utils'); const {sendHTML} = require('next/dist/next-server/server/send-html'); const buildManifest = require('${buildManifest}'); const reactLoadableManifest = require('${reactLoadableManifest}'); @@ -300,7 +301,7 @@ const nextServerlessLoader: loader.Loader = function() { return Object.keys(obj).reduce( (prev, key) => Object.assign(prev, { - [key]: encodeURIComponent(obj[key]) + [key]: obj[key] }), {} ); @@ -320,6 +321,9 @@ const nextServerlessLoader: loader.Loader = function() { const isFallback = parsedUrl.query.__nextFallback + const previewData = tryGetPreviewData(req, res, options.previewProps) + const isPreviewMode = previewData !== false + let result = await renderToHTML(req, res, "${page}", Object.assign({}, unstable_getStaticProps ? {} : parsedUrl.query, nowParams ? nowParams : params, _params, isFallback ? { __nextFallback: 'true' } : {}), renderOpts) if (_nextData && !fromExport) { @@ -329,12 +333,19 @@ const nextServerlessLoader: loader.Loader = function() { res.setHeader( 'Cache-Control', - unstable_getServerProps + isPreviewMode + ? \`private, no-cache, no-store, max-age=0, must-revalidate\` + : unstable_getServerProps ? \`no-cache, no-store, must-revalidate\` : \`s-maxage=\${renderOpts.revalidate}, stale-while-revalidate\` ) res.end(payload) return null + } else if (isPreviewMode) { + res.setHeader( + 'Cache-Control', + 'private, no-cache, no-store, max-age=0, must-revalidate' + ) } if (fromExport) return { html: result, renderOpts } diff --git a/packages/next/client/head-manager.js b/packages/next/client/head-manager.js index 5eec36503c0c..08b5c45a527a 100644 --- a/packages/next/client/head-manager.js +++ b/packages/next/client/head-manager.js @@ -5,90 +5,6 @@ const DOMAttributeNames = { httpEquiv: 'http-equiv', } -export default class HeadManager { - constructor() { - this.updatePromise = null - } - - updateHead = head => { - const promise = (this.updatePromise = Promise.resolve().then(() => { - if (promise !== this.updatePromise) return - - this.updatePromise = null - this.doUpdateHead(head) - })) - } - - doUpdateHead(head) { - const tags = {} - head.forEach(h => { - const components = tags[h.type] || [] - components.push(h) - tags[h.type] = components - }) - - this.updateTitle(tags.title ? tags.title[0] : null) - - const types = ['meta', 'base', 'link', 'style', 'script'] - types.forEach(type => { - this.updateElements(type, tags[type] || []) - }) - } - - updateTitle(component) { - let title = '' - if (component) { - const { children } = component.props - title = typeof children === 'string' ? children : children.join('') - } - if (title !== document.title) document.title = title - } - - updateElements(type, components) { - const headEl = document.getElementsByTagName('head')[0] - const headCountEl = headEl.querySelector('meta[name=next-head-count]') - if (process.env.NODE_ENV !== 'production') { - if (!headCountEl) { - console.error( - 'Warning: next-head-count is missing. https://err.sh/next.js/next-head-count-missing' - ) - return - } - } - - const headCount = Number(headCountEl.content) - const oldTags = [] - - for ( - let i = 0, j = headCountEl.previousElementSibling; - i < headCount; - i++, j = j.previousElementSibling - ) { - if (j.tagName.toLowerCase() === type) { - oldTags.push(j) - } - } - const newTags = components.map(reactElementToDOM).filter(newTag => { - for (let k = 0, len = oldTags.length; k < len; k++) { - const oldTag = oldTags[k] - if (oldTag.isEqualNode(newTag)) { - oldTags.splice(k, 1) - return false - } - } - return true - }) - - oldTags.forEach(t => t.parentNode.removeChild(t)) - newTags.forEach(t => headEl.insertBefore(t, headCountEl)) - headCountEl.content = ( - headCount - - oldTags.length + - newTags.length - ).toString() - } -} - function reactElementToDOM({ type, props }) { const el = document.createElement(type) for (const p in props) { @@ -110,3 +26,73 @@ function reactElementToDOM({ type, props }) { } return el } + +function updateElements(type, components) { + const headEl = document.getElementsByTagName('head')[0] + const headCountEl = headEl.querySelector('meta[name=next-head-count]') + if (process.env.NODE_ENV !== 'production') { + if (!headCountEl) { + console.error( + 'Warning: next-head-count is missing. https://err.sh/next.js/next-head-count-missing' + ) + return + } + } + + const headCount = Number(headCountEl.content) + const oldTags = [] + + for ( + let i = 0, j = headCountEl.previousElementSibling; + i < headCount; + i++, j = j.previousElementSibling + ) { + if (j.tagName.toLowerCase() === type) { + oldTags.push(j) + } + } + const newTags = components.map(reactElementToDOM).filter(newTag => { + for (let k = 0, len = oldTags.length; k < len; k++) { + const oldTag = oldTags[k] + if (oldTag.isEqualNode(newTag)) { + oldTags.splice(k, 1) + return false + } + } + return true + }) + + oldTags.forEach(t => t.parentNode.removeChild(t)) + newTags.forEach(t => headEl.insertBefore(t, headCountEl)) + headCountEl.content = (headCount - oldTags.length + newTags.length).toString() +} + +export default function initHeadManager() { + let updatePromise = null + + return head => { + const promise = (updatePromise = Promise.resolve().then(() => { + if (promise !== updatePromise) return + + updatePromise = null + const tags = {} + + head.forEach(h => { + const components = tags[h.type] || [] + components.push(h) + tags[h.type] = components + }) + + const titleComponent = tags.title ? tags.title[0] : null + let title = '' + if (titleComponent) { + const { children } = titleComponent.props + title = typeof children === 'string' ? children : children.join('') + } + if (title !== document.title) document.title = title + ;['meta', 'base', 'link', 'style', 'script'].forEach(type => { + updateElements(type, tags[type] || []) + }) + })) + } +} diff --git a/packages/next/client/index.js b/packages/next/client/index.js index 8cd2473aa15c..124b8ab35dc1 100644 --- a/packages/next/client/index.js +++ b/packages/next/client/index.js @@ -1,7 +1,7 @@ /* global location */ import React from 'react' import ReactDOM from 'react-dom' -import HeadManager from './head-manager' +import initHeadManager from './head-manager' import { createRouter, makePublicRouterInstance } from 'next/router' import mitt from '../next-server/lib/mitt' import { loadGetInitialProps, getURL, ST } from '../next-server/lib/utils' @@ -57,7 +57,7 @@ if (window.__NEXT_P) { window.__NEXT_P = [] window.__NEXT_P.push = register -const headManager = new HeadManager() +const updateHead = initHeadManager() const appElement = document.getElementById('__next') let lastAppProps @@ -397,7 +397,7 @@ function AppContainer({ children }) { } > - + {children} diff --git a/packages/next/lib/check-custom-routes.ts b/packages/next/lib/check-custom-routes.ts index b0dd787c271d..c3a538901323 100644 --- a/packages/next/lib/check-custom-routes.ts +++ b/packages/next/lib/check-custom-routes.ts @@ -78,6 +78,13 @@ export default function checkCustomRoutes( routes: Redirect[] | Header[] | Rewrite[], type: RouteType ): void { + if (!Array.isArray(routes)) { + throw new Error( + `${type}s must return an array, received ${typeof routes}.\n` + + `See here for more info: https://err.sh/next.js/routes-must-be-array` + ) + } + let numInvalidRoutes = 0 let hadInvalidStatus = false diff --git a/packages/next/next-server/server/api-utils.ts b/packages/next/next-server/server/api-utils.ts index 17c3332bcb83..340d4babd71f 100644 --- a/packages/next/next-server/server/api-utils.ts +++ b/packages/next/next-server/server/api-utils.ts @@ -414,13 +414,19 @@ function clearPreviewData(res: NextApiResponse): NextApiResponse { ? previous : []), serialize(COOKIE_NAME_PRERENDER_BYPASS, '', { - maxAge: 0, + // To delete a cookie, set `expires` to a date in the past: + // https://tools.ietf.org/html/rfc6265#section-4.1.1 + // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. + expires: new Date(0), httpOnly: true, sameSite: 'strict', path: '/', }), serialize(COOKIE_NAME_PRERENDER_DATA, '', { - maxAge: 0, + // To delete a cookie, set `expires` to a date in the past: + // https://tools.ietf.org/html/rfc6265#section-4.1.1 + // `Max-Age: 0` is not valid, thus ignored, and the cookie is persisted. + expires: new Date(0), httpOnly: true, sameSite: 'strict', path: '/', diff --git a/packages/next/next-server/server/next-server.ts b/packages/next/next-server/server/next-server.ts index bba5aba8efef..ba05500c7809 100644 --- a/packages/next/next-server/server/next-server.ts +++ b/packages/next/next-server/server/next-server.ts @@ -125,6 +125,9 @@ export default class Server { redirects: Redirect[] headers: Header[] } + protected staticPathsWorker?: import('jest-worker').default & { + loadStaticPaths: typeof import('../../server/static-paths-worker').loadStaticPaths + } public constructor({ dir = '.', @@ -823,20 +826,25 @@ export default class Server { res: ServerResponse, payload: any, type: string, - revalidate?: number | false + options?: { revalidate: number | false; private: boolean } ) { // TODO: ETag? Cache-Control headers? Next-specific headers? res.setHeader('Content-Type', type) res.setHeader('Content-Length', Buffer.byteLength(payload)) if (!this.renderOpts.dev) { - if (revalidate) { + if (options?.private) { res.setHeader( 'Cache-Control', - revalidate < 0 + `private, no-cache, no-store, max-age=0, must-revalidate` + ) + } else if (options?.revalidate) { + res.setHeader( + 'Cache-Control', + options.revalidate < 0 ? `no-cache, no-store, must-revalidate` - : `s-maxage=${revalidate}, stale-while-revalidate` + : `s-maxage=${options.revalidate}, stale-while-revalidate` ) - } else if (revalidate === false) { + } else if (options?.revalidate === false) { res.setHeader( 'Cache-Control', `s-maxage=31536000, stale-while-revalidate` @@ -881,6 +889,7 @@ export default class Server { typeof (components.Component as any).renderReqToHTML === 'function' const isSSG = !!components.unstable_getStaticProps const isServerProps = !!components.unstable_getServerProps + const hasStaticPaths = !!components.unstable_getStaticPaths // Toggle whether or not this is a Data request const isDataReq = query._nextDataReq @@ -912,7 +921,10 @@ export default class Server { res, JSON.stringify(renderResult?.renderOpts?.pageData), 'application/json', - -1 + { + revalidate: -1, + private: false, // Leave to user-land caching + } ) return null } @@ -926,7 +938,10 @@ export default class Server { ...opts, isDataReq, }) - this.__sendPayload(res, JSON.stringify(props), 'application/json', -1) + this.__sendPayload(res, JSON.stringify(props), 'application/json', { + revalidate: -1, + private: false, // Leave to user-land caching + }) return null } @@ -941,9 +956,10 @@ export default class Server { const isPreviewMode = previewData !== false // Compute the SPR cache key + const urlPathname = parseUrl(req.url || '').pathname! const ssgCacheKey = isPreviewMode ? `__` + nanoid() // Preview mode uses a throw away key to not coalesce preview invokes - : parseUrl(req.url || '').pathname! + : urlPathname // Complete the response with cached data if its present const cachedData = isPreviewMode @@ -959,7 +975,9 @@ export default class Server { res, data, isDataReq ? 'application/json' : 'text/html; charset=utf-8', - cachedData.curRevalidate + cachedData.curRevalidate !== undefined + ? { revalidate: cachedData.curRevalidate, private: isPreviewMode } + : undefined ) // Stop the request chain here if the data we sent was up-to-date @@ -1009,6 +1027,30 @@ export default class Server { const isProduction = !this.renderOpts.dev const isDynamicPathname = isDynamicRoute(pathname) const didRespond = isResSent(res) + + // we lazy load the staticPaths to prevent the user + // from waiting on them for the page to load in dev mode + let staticPaths: string[] | undefined + + if (!isProduction && hasStaticPaths) { + const __getStaticPaths = async () => { + const paths = await this.staticPathsWorker!.loadStaticPaths( + this.distDir, + this.buildId, + pathname, + !this.renderOpts.dev && this._isLikeServerless + ) + return paths + } + + staticPaths = ( + await withCoalescedInvoke(__getStaticPaths)( + `staticPaths-${pathname}`, + [] + ) + ).value + } + // const isForcedBlocking = // req.headers['X-Prerender-Bypass-Mode'] !== 'Blocking' @@ -1019,20 +1061,20 @@ export default class Server { // // * Preview mode toggles all pages to be resolved in a blocking manner. // - // * Non-dynamic pages should block (though this is an be an impossible + // * Non-dynamic pages should block (though this is an impossible // case in production). // - // * Dynamic pages should return their skeleton, then finish the data - // request on the client-side. + // * Dynamic pages should return their skeleton if not defined in + // getStaticPaths, then finish the data request on the client-side. // if ( !didRespond && !isDataReq && !isPreviewMode && isDynamicPathname && - // TODO: development should trigger fallback when the path is not in - // `getStaticPaths`, for now, let's assume it is. - isProduction + // Development should trigger fallback when the path is not in + // `getStaticPaths` + (isProduction || !staticPaths || !staticPaths.includes(urlPathname)) ) { let html: string @@ -1066,7 +1108,7 @@ export default class Server { res, isDataReq ? JSON.stringify(pageData) : html, isDataReq ? 'application/json' : 'text/html; charset=utf-8', - sprRevalidate + { revalidate: sprRevalidate, private: isPreviewMode } ) } diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index 694e73db0464..4ce90f66f7d5 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -528,6 +528,7 @@ export async function renderToHTML( if (!dev || !err) throw err ctx.err = err renderOpts.err = err + console.error(err) } if (unstable_getServerProps && !isFallback) { diff --git a/packages/next/package.json b/packages/next/package.json index feb8ff00c485..3f8906b4f757 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -1,6 +1,6 @@ { "name": "next", - "version": "9.2.3-canary.8", + "version": "9.2.3-canary.12", "description": "The React Framework", "main": "./dist/server/next.js", "license": "MIT", @@ -73,7 +73,7 @@ "@babel/preset-typescript": "7.7.2", "@babel/runtime": "7.7.2", "@babel/types": "7.7.4", - "@next/polyfill-nomodule": "9.2.3-canary.8", + "@next/polyfill-nomodule": "9.2.3-canary.12", "amphtml-validator": "1.0.30", "async-retry": "1.2.3", "async-sema": "3.0.0", diff --git a/packages/next/pages/_document.tsx b/packages/next/pages/_document.tsx index 5d63deda249b..f094406f21fe 100644 --- a/packages/next/pages/_document.tsx +++ b/packages/next/pages/_document.tsx @@ -186,6 +186,7 @@ export class Head extends Component< getCssLinks(): JSX.Element[] | null { const { assetPrefix, files } = this.context._documentProps + const { _devOnlyInvalidateCacheQueryString } = this.context const cssFiles = files && files.length ? files.filter(f => /\.css$/.test(f)) : [] @@ -196,7 +197,9 @@ export class Head extends Component< key={`${file}-preload`} nonce={this.props.nonce} rel="preload" - href={`${assetPrefix}/_next/${encodeURI(file)}`} + href={`${assetPrefix}/_next/${encodeURI( + file + )}${_devOnlyInvalidateCacheQueryString}`} as="style" crossOrigin={this.props.crossOrigin || process.crossOrigin} />, @@ -204,7 +207,9 @@ export class Head extends Component< key={file} nonce={this.props.nonce} rel="stylesheet" - href={`${assetPrefix}/_next/${encodeURI(file)}`} + href={`${assetPrefix}/_next/${encodeURI( + file + )}${_devOnlyInvalidateCacheQueryString}`} crossOrigin={this.props.crossOrigin || process.crossOrigin} /> ) diff --git a/packages/next/server/next-dev-server.ts b/packages/next/server/next-dev-server.ts index 65b5f71cc55e..746b27bb1f28 100644 --- a/packages/next/server/next-dev-server.ts +++ b/packages/next/server/next-dev-server.ts @@ -30,6 +30,7 @@ import { Telemetry } from '../telemetry/storage' import ErrorDebug from './error-debug' import HotReloader from './hot-reloader' import { findPageFile } from './lib/find-page-file' +import Worker from 'jest-worker' if (typeof React.Suspense === 'undefined') { throw new Error( @@ -81,6 +82,18 @@ export default class DevServer extends Server { } this.isCustomServer = !options.isNextDevCommand this.pagesDir = findPagesDir(this.dir) + this.staticPathsWorker = new Worker( + require.resolve('./static-paths-worker'), + { + maxRetries: 0, + numWorkers: this.nextConfig.experimental.cpus, + } + ) as Worker & { + loadStaticPaths: typeof import('./static-paths-worker').loadStaticPaths + } + + this.staticPathsWorker.getStdout().pipe(process.stdout) + this.staticPathsWorker.getStderr().pipe(process.stderr) } protected currentPhase() { diff --git a/packages/next/server/static-paths-worker.ts b/packages/next/server/static-paths-worker.ts new file mode 100644 index 000000000000..51d0047a5aad --- /dev/null +++ b/packages/next/server/static-paths-worker.ts @@ -0,0 +1,40 @@ +import { join } from 'path' +import { buildStaticPaths } from '../build/utils' +import { getPagePath } from '../next-server/server/require' +import { loadComponents } from '../next-server/server/load-components' +import { PAGES_MANIFEST, SERVER_DIRECTORY } from '../next-server/lib/constants' + +// we call getStaticPaths in a separate process to ensure +// side-effects aren't relied on in dev that will break +// during a production build +export async function loadStaticPaths( + distDir: string, + buildId: string, + pathname: string, + serverless: boolean +) { + // we need to clear any modules manually here since the + // require-cache-hot-loader doesn't affect require cache here + // since we're in a separate process + delete require.cache[join(distDir, SERVER_DIRECTORY, PAGES_MANIFEST)] + + const pagePath = await getPagePath(pathname, distDir, serverless, true) + delete require.cache[pagePath] + + const components = await loadComponents( + distDir, + buildId, + pathname, + serverless + ) + + if (!components.unstable_getStaticPaths) { + // we shouldn't get to this point since the worker should + // only be called for SSG pages with getStaticPaths + throw new Error( + `Invariant: failed to load page with unstable_getStaticPaths for ${pathname}` + ) + } + + return buildStaticPaths(pathname, components.unstable_getStaticPaths) +} diff --git a/test/integration/error-load-fail/test/index.test.js b/test/integration/error-load-fail/test/index.test.js index fafdc88ff9d7..930ee15d0393 100644 --- a/test/integration/error-load-fail/test/index.test.js +++ b/test/integration/error-load-fail/test/index.test.js @@ -1,23 +1,22 @@ /* eslint-env jest */ /* global jasmine */ -import path from 'path' +import { join } from 'path' +import fs from 'fs-extra' import webdriver from 'next-webdriver' -import { - nextBuild, - nextStart, - findPort, - killApp, - waitFor, -} from 'next-test-utils' +import { nextBuild, nextStart, findPort, killApp, check } from 'next-test-utils' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 -const appDir = path.join(__dirname, '..') +const appDir = join(__dirname, '..') +let app describe('Failing to load _error', () => { + afterAll(() => killApp(app)) + it('handles failing to load _error correctly', async () => { await nextBuild(appDir) + const buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') const appPort = await findPort() - const app = await nextStart(appDir, appPort) + app = await nextStart(appDir, appPort) const browser = await webdriver(appPort, '/') await browser.eval(`window.beforeNavigate = true`) @@ -25,12 +24,15 @@ describe('Failing to load _error', () => { await browser.elementByCss('#to-broken').moveTo() await browser.waitForElementByCss('script[src*="broken.js"') - // stop app so that _error can't be loaded - await killApp(app) + // remove _error client bundle so that it can't be loaded + await fs.remove(join(appDir, '.next/static/', buildId, 'pages/_error.js')) await browser.elementByCss('#to-broken').click() - await waitFor(2000) - expect(await browser.eval('window.beforeNavigate')).toBeFalsy() + await check(async () => { + return !(await browser.eval('window.beforeNavigate')) + ? 'reloaded' + : 'fail' + }, /reloaded/) }) }) diff --git a/test/integration/invalid-custom-routes/test/index.test.js b/test/integration/invalid-custom-routes/test/index.test.js index e2c3d82c1968..92b0b166309e 100644 --- a/test/integration/invalid-custom-routes/test/index.test.js +++ b/test/integration/invalid-custom-routes/test/index.test.js @@ -9,7 +9,7 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 let appDir = join(__dirname, '..') const nextConfigPath = join(appDir, 'next.config.js') -const writeConfig = async (routes = [], type = 'redirects') => { +const writeConfig = async (routes, type = 'redirects') => { await fs.writeFile( nextConfigPath, ` @@ -322,6 +322,36 @@ const runTests = () => { expect(stderr).toContain(`Reason: Unexpected MODIFIER at 10, expected END`) expect(stderr).toContain(`/learning/?`) }) + + it('should show valid error when non-array is returned from rewrites', async () => { + await writeConfig( + { + source: '/feedback/(?!general)', + destination: '/feedback/general', + }, + 'rewrites' + ) + + const stderr = await getStderr() + + expect(stderr).toContain(`rewrites must return an array, received object`) + }) + + it('should show valid error when non-array is returned from redirects', async () => { + await writeConfig(false, 'redirects') + + const stderr = await getStderr() + + expect(stderr).toContain(`redirects must return an array, received boolean`) + }) + + it('should show valid error when non-array is returned from headers', async () => { + await writeConfig(undefined, 'headers') + + const stderr = await getStderr() + + expect(stderr).toContain(`headers must return an array, received undefined`) + }) } describe('Errors on invalid custom routes', () => { diff --git a/test/integration/prerender-preview/server.js b/test/integration/prerender-preview/server.js new file mode 100644 index 000000000000..c35347a48951 --- /dev/null +++ b/test/integration/prerender-preview/server.js @@ -0,0 +1,41 @@ +const http = require('http') +const url = require('url') +const fs = require('fs') +const path = require('path') +const server = http.createServer((req, res) => { + let { pathname } = url.parse(req.url) + if (pathname.startsWith('/_next/data')) { + pathname = pathname + .replace(`/_next/data/${process.env.BUILD_ID}/`, '/') + .replace(/\.json$/, '') + } + console.log('serving', pathname) + + if (pathname === '/favicon.ico') { + res.statusCode = 404 + return res.end() + } + + if (pathname.startsWith('/_next/static/')) { + res.write( + fs.readFileSync( + path.join( + __dirname, + './.next/static/', + pathname.slice('/_next/static/'.length) + ), + 'utf8' + ) + ) + return res.end() + } else { + const re = require(`./.next/serverless/pages${pathname}`) + return typeof re.render === 'function' + ? re.render(req, res) + : re.default(req, res) + } +}) + +server.listen(process.env.PORT, () => { + console.log('ready on', process.env.PORT) +}) diff --git a/test/integration/prerender-preview/test/index.test.js b/test/integration/prerender-preview/test/index.test.js index 120be2cef3c5..51046b0d59b7 100644 --- a/test/integration/prerender-preview/test/index.test.js +++ b/test/integration/prerender-preview/test/index.test.js @@ -6,6 +6,7 @@ import fs from 'fs-extra' import { fetchViaHTTP, findPort, + initNextServerScript, killApp, nextBuild, nextStart, @@ -20,6 +21,10 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 const appDir = join(__dirname, '..') const nextConfigPath = join(appDir, 'next.config.js') +async function getBuildId() { + return fs.readFile(join(appDir, '.next', 'BUILD_ID'), 'utf8') +} + function getData(html) { const $ = cheerio.load(html) const nextData = $('#__NEXT_DATA__') @@ -27,7 +32,7 @@ function getData(html) { return { nextData: JSON.parse(nextData.html()), pre: preEl.text() } } -function runTests() { +function runTests(startServer = nextStart) { it('should compile successfully', async () => { await fs.remove(join(appDir, '.next')) const { code, stdout } = await nextBuild(appDir, [], { @@ -40,7 +45,7 @@ function runTests() { let appPort, app it('should start production application', async () => { appPort = await findPort() - app = await nextStart(appDir, appPort) + app = await startServer(appDir, appPort) }) it('should return prerendered page on first request', async () => { @@ -91,10 +96,33 @@ function runTests() { const html = await res.text() const { nextData, pre } = getData(html) + expect(res.headers.get('cache-control')).toBe( + 'private, no-cache, no-store, max-age=0, must-revalidate' + ) expect(nextData).toMatchObject({ isFallback: false }) expect(pre).toBe('true and {"lets":"goooo"}') }) + it('should return correct caching headers for data preview request', async () => { + const res = await fetchViaHTTP( + appPort, + `/_next/data/${encodeURI(await getBuildId())}/index.json`, + {}, + { headers: { Cookie: previewCookieString } } + ) + const json = await res.json() + + expect(res.headers.get('cache-control')).toBe( + 'private, no-cache, no-store, max-age=0, must-revalidate' + ) + expect(json).toMatchObject({ + pageProps: { + preview: true, + previewData: { lets: 'goooo' }, + }, + }) + }) + it('should return cookies to be expired on reset request', async () => { const res = await fetchViaHTTP( appPort, @@ -106,6 +134,7 @@ function runTests() { const cookies = res.headers .get('set-cookie') + .replace(/(=\w{3}),/g, '$1') .split(',') .map(cookie.parse) @@ -113,15 +142,17 @@ function runTests() { expect(cookies[0]).toMatchObject({ Path: '/', SameSite: 'Strict', - 'Max-Age': '0', + Expires: 'Thu 01 Jan 1970 00:00:00 GMT', }) expect(cookies[0]).toHaveProperty('__prerender_bypass') + expect(cookies[0]).not.toHaveProperty('Max-Age') expect(cookies[1]).toMatchObject({ Path: '/', SameSite: 'Strict', - 'Max-Age': '0', + Expires: 'Thu 01 Jan 1970 00:00:00 GMT', }) expect(cookies[1]).toHaveProperty('__next_preview_data') + expect(cookies[1]).not.toHaveProperty('Max-Age') }) /** @type import('next-webdriver').Chain */ @@ -159,6 +190,16 @@ function runTests() { }) } +const startServerlessEmulator = async (dir, port) => { + const scriptPath = join(dir, 'server.js') + const env = Object.assign( + {}, + { ...process.env }, + { PORT: port, BUILD_ID: await getBuildId() } + ) + return initNextServerScript(scriptPath, /ready on/i, env) +} + describe('Prerender Preview Mode', () => { describe('Server Mode', () => { beforeAll(async () => { @@ -167,6 +208,7 @@ describe('Prerender Preview Mode', () => { runTests() }) + describe('Serverless Mode', () => { beforeAll(async () => { await fs.writeFile( @@ -180,4 +222,18 @@ describe('Prerender Preview Mode', () => { runTests() }) + + describe('Emulated Serverless Mode', () => { + beforeAll(async () => { + await fs.writeFile( + nextConfigPath, + `module.exports = { target: 'experimental-serverless-trace' }` + os.EOL + ) + }) + afterAll(async () => { + await fs.remove(nextConfigPath) + }) + + runTests(startServerlessEmulator) + }) }) diff --git a/test/integration/prerender/pages/catchall/[...slug].js b/test/integration/prerender/pages/catchall/[...slug].js index c2ff67739caf..b0010c612446 100644 --- a/test/integration/prerender/pages/catchall/[...slug].js +++ b/test/integration/prerender/pages/catchall/[...slug].js @@ -29,5 +29,5 @@ export default ({ slug }) => { if (isFallback) { return

fallback

} - return

Hi {slug.join('/')}

+ return

Hi {slug.join(' ')}

} diff --git a/test/integration/prerender/pages/index.js b/test/integration/prerender/pages/index.js index 3d639e231c03..1c9bf5259b50 100644 --- a/test/integration/prerender/pages/index.js +++ b/test/integration/prerender/pages/index.js @@ -2,6 +2,7 @@ import Link from 'next/link' // eslint-disable-next-line camelcase export async function unstable_getStaticProps() { + // throw new Error('oops from getStaticProps') return { props: { world: 'world', time: new Date().getTime() }, // bad-prop @@ -12,6 +13,7 @@ export async function unstable_getStaticProps() { const Page = ({ world, time }) => { return ( <> + {/*
idk
*/}

hello {world}

time: {time} diff --git a/test/integration/prerender/server.js b/test/integration/prerender/server.js index 1ed0bd58953f..056bdcdd7212 100644 --- a/test/integration/prerender/server.js +++ b/test/integration/prerender/server.js @@ -1,15 +1,102 @@ const http = require('http') const url = require('url') - +const fs = require('fs') +const path = require('path') const server = http.createServer((req, res) => { let { pathname } = url.parse(req.url) + pathname = pathname.replace(/\/$/, '') + let isDataReq = false if (pathname.startsWith('/_next/data')) { + isDataReq = true pathname = pathname .replace(`/_next/data/${process.env.BUILD_ID}/`, '/') .replace(/\.json$/, '') } console.log('serving', pathname) - require(`./.next/serverless/pages${pathname}`).render(req, res) + + if (pathname === '/favicon.ico') { + res.statusCode = 404 + return res.end() + } + + if (pathname.startsWith('/_next/static/')) { + res.write( + fs.readFileSync( + path.join( + __dirname, + './.next/static/', + decodeURI(pathname.slice('/_next/static/'.length)) + ), + 'utf8' + ) + ) + return res.end() + } else { + const ext = isDataReq ? 'json' : 'html' + if ( + fs.existsSync( + path.join(__dirname, `./.next/serverless/pages${pathname}.${ext}`) + ) + ) { + res.write( + fs.readFileSync( + path.join(__dirname, `./.next/serverless/pages${pathname}.${ext}`), + 'utf8' + ) + ) + return res.end() + } + + let re + try { + re = require(`./.next/serverless/pages${pathname}`) + } catch { + const d = decodeURI(pathname) + if ( + fs.existsSync( + path.join(__dirname, `./.next/serverless/pages${d}.${ext}`) + ) + ) { + res.write( + fs.readFileSync( + path.join(__dirname, `./.next/serverless/pages${d}.${ext}`), + 'utf8' + ) + ) + return res.end() + } + + const routesManifest = require('./.next/routes-manifest.json') + const { dynamicRoutes } = routesManifest + dynamicRoutes.some(({ page, regex }) => { + if (new RegExp(regex).test(pathname)) { + if ( + fs.existsSync( + path.join(__dirname, `./.next/serverless/pages${page}.${ext}`) + ) + ) { + res.write( + fs.readFileSync( + path.join(__dirname, `./.next/serverless/pages${page}.${ext}`), + 'utf8' + ) + ) + res.end() + return true + } + + re = require(`./.next/serverless/pages${page}`) + return true + } + return false + }) + } + if (!res.finished) { + return typeof re.render === 'function' + ? re.render(req, res) + : re.default(req, res) + } + } }) server.listen(process.env.PORT, () => { diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 1de888d0808e..f5431a853cd4 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -1,29 +1,32 @@ /* eslint-env jest */ /* global jasmine */ -import fs from 'fs-extra' -import { join, dirname } from 'path' import cheerio from 'cheerio' -import webdriver from 'next-webdriver' import escapeRegex from 'escape-string-regexp' +import fs from 'fs-extra' import { - renderViaHTTP, + check, fetchViaHTTP, findPort, - launchApp, + getReactErrorOverlayContent, + initNextServerScript, killApp, - waitFor, + launchApp, nextBuild, - nextStart, - stopApp, nextExport, + nextStart, normalizeRegEx, + renderViaHTTP, startStaticServer, - initNextServerScript, + stopApp, + waitFor, } from 'next-test-utils' +import webdriver from 'next-webdriver' +import { dirname, join } from 'path' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 const appDir = join(__dirname, '..') const nextConfig = join(appDir, 'next.config.js') +const indexPage = join(__dirname, '../pages/index.js') let app let appPort let buildId @@ -243,7 +246,7 @@ const navigateTest = (dev = false) => { }) } -const runTests = (dev = false) => { +const runTests = (dev = false, looseMode = false) => { navigateTest(dev) it('should SSR normal page correctly', async () => { @@ -374,33 +377,45 @@ const runTests = (dev = false) => { .text() ).isFallback ).toBe(false) - expect($('#catchall').text()).toMatch(/Hi.*?another\/value/) + expect($('#catchall').text()).toMatch(/Hi.*?another value/) }) it('should support lazy catchall route', async () => { - // Dev doesn't support fallback yet - if (dev) { - const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths') - const $ = cheerio.load(html) - expect($('#catchall').text()).toMatch(/Hi.*?notreturnedinpaths/) - } - // Production will render fallback for a "lazy" route - else { - const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths') - const $ = cheerio.load(html) - expect($('#catchall').text()).toBe('fallback') + const html = await renderViaHTTP(appPort, '/catchall/notreturnedinpaths') + const $ = cheerio.load(html) + expect($('#catchall').text()).toBe('fallback') - // hydration - const browser = await webdriver(appPort, '/catchall/delayby3s') + // hydration + const browser = await webdriver(appPort, '/catchall/delayby3s') - const text1 = await browser.elementByCss('#catchall').text() - expect(text1).toBe('fallback') + const text1 = await browser.elementByCss('#catchall').text() + expect(text1).toBe('fallback') - await new Promise(resolve => setTimeout(resolve, 4000)) + await check( + () => browser.elementByCss('#catchall').text(), + /Hi.*?delayby3s/ + ) + }) - const text2 = await browser.elementByCss('#catchall').text() - expect(text2).toMatch(/Hi.*?delayby3s/) - } + it('should support nested lazy catchall route', async () => { + // We will render fallback for a "lazy" route + const html = await renderViaHTTP( + appPort, + '/catchall/notreturnedinpaths/nested' + ) + const $ = cheerio.load(html) + expect($('#catchall').text()).toBe('fallback') + + // hydration + const browser = await webdriver(appPort, '/catchall/delayby3s/nested') + + const text1 = await browser.elementByCss('#catchall').text() + expect(text1).toBe('fallback') + + await check( + () => browser.elementByCss('#catchall').text(), + /Hi.*?delayby3s nested/ + ) }) if (dev) { @@ -413,6 +428,53 @@ const runTests = (dev = false) => { // ) // }) + it('should always show fallback for page not in getStaticPaths', async () => { + const html = await renderViaHTTP(appPort, '/blog/post-321') + const $ = cheerio.load(html) + expect(JSON.parse($('#__NEXT_DATA__').text()).isFallback).toBe(true) + + // make another request to ensure it still is + const html2 = await renderViaHTTP(appPort, '/blog/post-321') + const $2 = cheerio.load(html2) + expect(JSON.parse($2('#__NEXT_DATA__').text()).isFallback).toBe(true) + }) + + it('should not show fallback for page in getStaticPaths', async () => { + const html = await renderViaHTTP(appPort, '/blog/post-1') + const $ = cheerio.load(html) + expect(JSON.parse($('#__NEXT_DATA__').text()).isFallback).toBe(false) + + // make another request to ensure it's still not + const html2 = await renderViaHTTP(appPort, '/blog/post-1') + const $2 = cheerio.load(html2) + expect(JSON.parse($2('#__NEXT_DATA__').text()).isFallback).toBe(false) + }) + + it('should log error in console and browser in dev mode', async () => { + const origContent = await fs.readFile(indexPage, 'utf8') + + const browser = await webdriver(appPort, '/') + expect(await browser.elementByCss('p').text()).toMatch(/hello.*?world/) + + await fs.writeFile( + indexPage, + origContent + .replace('// throw new', 'throw new') + .replace('{/* */}', '') + ) + await browser.waitForElementByCss('#after-change') + // we need to reload the page to trigger getStaticProps + await browser.refresh() + + const errOverlayContent = await getReactErrorOverlayContent(browser) + + await fs.writeFile(indexPage, origContent) + const errorMsg = /oops from getStaticProps/ + expect(stderr).toMatch(errorMsg) + expect(errOverlayContent).toMatch(errorMsg) + }) + it('should always call getStaticProps without caching in dev', async () => { const initialRes = await fetchViaHTTP(appPort, '/something') expect(initialRes.headers.get('cache-control')).toBeFalsy() @@ -433,7 +495,6 @@ const runTests = (dev = false) => { }) it('should error on bad object from getStaticProps', async () => { - const indexPage = join(__dirname, '../pages/index.js') const origContent = await fs.readFile(indexPage, 'utf8') await fs.writeFile( indexPage, @@ -492,14 +553,16 @@ const runTests = (dev = false) => { expect(curRandom).toBe(initialRandom + '') }) } else { - it('should should use correct caching headers for a no-revalidate page', async () => { - const initialRes = await fetchViaHTTP(appPort, '/something') - expect(initialRes.headers.get('cache-control')).toBe( - 's-maxage=31536000, stale-while-revalidate' - ) - const initialHtml = await initialRes.text() - expect(initialHtml).toMatch(/hello.*?world/) - }) + if (!looseMode) { + it('should should use correct caching headers for a no-revalidate page', async () => { + const initialRes = await fetchViaHTTP(appPort, '/something') + expect(initialRes.headers.get('cache-control')).toBe( + 's-maxage=31536000, stale-while-revalidate' + ) + const initialHtml = await initialRes.text() + expect(initialHtml).toMatch(/hello.*?world/) + }) + } it('outputs a prerender-manifest correctly', async () => { const manifest = JSON.parse( @@ -574,20 +637,22 @@ const runTests = (dev = false) => { } }) - it('should handle de-duping correctly', async () => { - let vals = new Array(10).fill(null) + if (!looseMode) { + it('should handle de-duping correctly', async () => { + let vals = new Array(10).fill(null) - // use data route so we don't get the fallback - vals = await Promise.all( - vals.map(() => - renderViaHTTP(appPort, `/_next/data/${buildId}/blog/post-10.json`) + // use data route so we don't get the fallback + vals = await Promise.all( + vals.map(() => + renderViaHTTP(appPort, `/_next/data/${buildId}/blog/post-10.json`) + ) ) - ) - const val = vals[0] + const val = vals[0] - expect(JSON.parse(val).pageProps.post).toBe('post-10') - expect(new Set(vals).size).toBe(1) - }) + expect(JSON.parse(val).pageProps.post).toBe('post-10') + expect(new Set(vals).size).toBe(1) + }) + } it('should not revalidate when set to false', async () => { const route = '/something' @@ -602,43 +667,45 @@ const runTests = (dev = false) => { expect(initialHtml).toBe(newHtml) }) - it('should handle revalidating HTML correctly', async () => { - const route = '/blog/post-2/comment-2' - const initialHtml = await renderViaHTTP(appPort, route) - expect(initialHtml).toMatch(/Post:.*?post-2/) - expect(initialHtml).toMatch(/Comment:.*?comment-2/) + if (!looseMode) { + it('should handle revalidating HTML correctly', async () => { + const route = '/blog/post-2/comment-2' + const initialHtml = await renderViaHTTP(appPort, route) + expect(initialHtml).toMatch(/Post:.*?post-2/) + expect(initialHtml).toMatch(/Comment:.*?comment-2/) - let newHtml = await renderViaHTTP(appPort, route) - expect(newHtml).toBe(initialHtml) + let newHtml = await renderViaHTTP(appPort, route) + expect(newHtml).toBe(initialHtml) - await waitFor(2 * 1000) - await renderViaHTTP(appPort, route) + await waitFor(2 * 1000) + await renderViaHTTP(appPort, route) - await waitFor(2 * 1000) - newHtml = await renderViaHTTP(appPort, route) - expect(newHtml === initialHtml).toBe(false) - expect(newHtml).toMatch(/Post:.*?post-2/) - expect(newHtml).toMatch(/Comment:.*?comment-2/) - }) + await waitFor(2 * 1000) + newHtml = await renderViaHTTP(appPort, route) + expect(newHtml === initialHtml).toBe(false) + expect(newHtml).toMatch(/Post:.*?post-2/) + expect(newHtml).toMatch(/Comment:.*?comment-2/) + }) - it('should handle revalidating JSON correctly', async () => { - const route = `/_next/data/${buildId}/blog/post-2/comment-3.json` - const initialJson = await renderViaHTTP(appPort, route) - expect(initialJson).toMatch(/post-2/) - expect(initialJson).toMatch(/comment-3/) + it('should handle revalidating JSON correctly', async () => { + const route = `/_next/data/${buildId}/blog/post-2/comment-3.json` + const initialJson = await renderViaHTTP(appPort, route) + expect(initialJson).toMatch(/post-2/) + expect(initialJson).toMatch(/comment-3/) - let newJson = await renderViaHTTP(appPort, route) - expect(newJson).toBe(initialJson) + let newJson = await renderViaHTTP(appPort, route) + expect(newJson).toBe(initialJson) - await waitFor(2 * 1000) - await renderViaHTTP(appPort, route) + await waitFor(2 * 1000) + await renderViaHTTP(appPort, route) - await waitFor(2 * 1000) - newJson = await renderViaHTTP(appPort, route) - expect(newJson === initialJson).toBe(false) - expect(newJson).toMatch(/post-2/) - expect(newJson).toMatch(/comment-3/) - }) + await waitFor(2 * 1000) + newJson = await renderViaHTTP(appPort, route) + expect(newJson === initialJson).toBe(false) + expect(newJson).toMatch(/post-2/) + expect(newJson).toMatch(/comment-3/) + }) + } it('should not fetch prerender data on mount', async () => { const browser = await webdriver(appPort, '/blog/post-100') @@ -656,7 +723,7 @@ const runTests = (dev = false) => { } } -describe('SPR Prerender', () => { +describe('SSG Prerender', () => { afterAll(() => fs.remove(nextConfig)) describe('dev mode', () => { @@ -698,6 +765,7 @@ describe('SPR Prerender', () => { `module.exports = { target: 'serverless' }`, 'utf8' ) + await fs.remove(join(appDir, '.next')) await nextBuild(appDir) stderr = '' appPort = await findPort() @@ -740,6 +808,7 @@ describe('SPR Prerender', () => { export default () => 'hello world' ` ) + await fs.remove(join(appDir, '.next')) const { stderr } = await nextBuild(appDir, [], { stderr: true }) await fs.remove(brokenPage) expect(stderr).toContain( @@ -751,10 +820,43 @@ describe('SPR Prerender', () => { }) }) + describe('enumlated serverless mode', () => { + beforeAll(async () => { + const startServerlessEmulator = async (dir, port, buildId) => { + const scriptPath = join(dir, 'server.js') + const env = Object.assign( + {}, + { ...process.env }, + { PORT: port, BUILD_ID: buildId } + ) + return initNextServerScript(scriptPath, /ready on/i, env) + } + + await fs.writeFile( + nextConfig, + `module.exports = { target: 'experimental-serverless-trace' }`, + 'utf8' + ) + await fs.remove(join(appDir, '.next')) + await nextBuild(appDir) + + distPagesDir = join(appDir, '.next/serverless/pages') + buildId = await fs.readFile(join(appDir, '.next/BUILD_ID'), 'utf8') + + stderr = '' + appPort = await findPort() + app = await startServerlessEmulator(appDir, appPort, buildId) + }) + afterAll(() => killApp(app)) + + runTests(false, true) + }) + describe('production mode', () => { let buildOutput = '' beforeAll(async () => { await fs.remove(nextConfig) + await fs.remove(join(appDir, '.next')) const { stdout } = await nextBuild(appDir, [], { stdout: true }) buildOutput = stdout @@ -794,6 +896,7 @@ describe('SPR Prerender', () => { }, }` ) + await fs.remove(join(appDir, '.next')) await nextBuild(appDir) await nextExport(appDir, { outdir: exportDir }) app = await startStaticServer(exportDir) diff --git a/test/integration/serverless/pages/catchall/[...slug].js b/test/integration/serverless/pages/catchall/[...slug].js new file mode 100644 index 000000000000..0f2990960563 --- /dev/null +++ b/test/integration/serverless/pages/catchall/[...slug].js @@ -0,0 +1,5 @@ +const SlugPage = ({ query }) =>
{JSON.stringify(query)}
+ +SlugPage.getInitialProps = ({ query }) => ({ query }) + +export default SlugPage diff --git a/test/integration/serverless/test/index.test.js b/test/integration/serverless/test/index.test.js index ce9d5fc79afd..79ca395a371e 100644 --- a/test/integration/serverless/test/index.test.js +++ b/test/integration/serverless/test/index.test.js @@ -251,10 +251,30 @@ describe('Serverless', () => { expect(data.query).toEqual({ slug: paramRaw }) }) - it('should have the correct query string for a spr route', async () => { + it('should have the correct query string for a now route', async () => { const paramRaw = 'test % 123' const html = await fetchViaHTTP(appPort, `/dr/[slug]`, '', { - headers: { 'x-now-route-matches': qs.stringify({ 1: paramRaw }) }, + headers: { + 'x-now-route-matches': qs.stringify({ + 1: encodeURIComponent(paramRaw), + }), + }, + }).then(res => res.text()) + const $ = cheerio.load(html) + const data = JSON.parse($('#__NEXT_DATA__').html()) + + expect(data.query).toEqual({ slug: paramRaw }) + }) + + it('should have the correct query string for a catch all now route', async () => { + const paramRaw = ['nested % 1', 'nested/2'] + + const html = await fetchViaHTTP(appPort, `/catchall/[...slug]`, '', { + headers: { + 'x-now-route-matches': qs.stringify({ + 1: paramRaw.map(e => encodeURIComponent(e)).join('/'), + }), + }, }).then(res => res.text()) const $ = cheerio.load(html) const data = JSON.parse($('#__NEXT_DATA__').html()) diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index 0d36408825aa..1700dafa5efe 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -80,7 +80,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizesBytes - 238 * 1024 + const delta = responseSizesBytes - 237 * 1024 expect(delta).toBeLessThanOrEqual(1024) // don't increase size more than 1kb expect(delta).toBeGreaterThanOrEqual(-1024) // don't decrease size more than 1kb without updating target })