forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into cms-takeshape
* canary: (47 commits) v9.3.1-canary.5 Update @next/bundle-analyzer dependencies (vercel#11068) Update preset.ts: Remove any and use updated Node.js types (vercel#11075) Upgrade styled-jsx (vercel#11070) Update ssr-caching example with getServerSideProps (vercel#11032) Add support for static 404 when _error does not have custom GIP (vercel#11062) update form handler example (vercel#11059) Update with-loading example to SSG (vercel#11050) Upgrade next.js version on datocms example (vercel#11039) Update custom-server-express example with getServerSideProps (vercel#11035) Use getServerSideProps (vercel#11057) v9.3.1-canary.4 Updated analyze-bundles example (vercel#11031) Update custom-server-fastify example to not use internal fn (vercel#11040) Correct Cache-Control Behavior for GS(S)P (vercel#11022) Update next-sass example to use built-in sass support (vercel#11015) Update with-zeit-fetch example to use SSG (vercel#11026) Update amp-first example to use GSSP (vercel#11028) Fix Test for Windows feat: update api-routes example to SSG (vercel#11019) ...
- Loading branch information
Showing
136 changed files
with
2,341 additions
and
634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ node_modules | |
**/_next/** | ||
**/dist/** | ||
examples/with-ioc/** | ||
examples/with-kea/** | ||
examples/with-kea/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
node_modules | ||
**/.next/** | ||
**/_next/** | ||
**/dist/** | ||
**/dist/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
**/.next/** | ||
**/_next/** | ||
**/dist/** | ||
**/dist/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Built-in CSS Support Disabled | ||
|
||
#### Why This Error Occurred | ||
|
||
Custom CSS configuration was added in `next.config.js` which disables the built-in CSS/SCSS support to prevent conflicting configuration. | ||
|
||
A legacy plugin such as `@zeit/next-css` being added in `next.config.js` can cause this message. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
If you would like to leverage the built-in CSS/SCSS support you can remove any custom CSS configuration or any plugins like `@zeit/next-css` or `@zeit/next-sass` in your `next.config.js`. | ||
|
||
If you would prefer not to leverage the built-in support you can ignore this message. | ||
|
||
### Useful Links | ||
|
||
- [Built-in CSS Support docs](https://nextjs.org/docs/basic-features/built-in-css-support) | ||
- [Custom webpack config docs](https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Install `sass` to Use Built-In Sass Support | ||
|
||
#### Why This Error Occurred | ||
|
||
Using Next.js' [built-in Sass support](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) requires that you bring your own version of Sass. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Please install the `sass` package in your project. | ||
|
||
```bash | ||
npm i sass | ||
# or | ||
yarn add sass | ||
``` | ||
|
||
### Useful Links | ||
|
||
- [Sass Support in Documentation](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import faker from 'faker' | ||
|
||
export default class Index extends React.Component { | ||
static getInitialProps({ req }) { | ||
if (req) { | ||
// Runs only in the server | ||
const faker = require('faker') | ||
const name = faker.name.findName() | ||
return { name } | ||
} | ||
|
||
// Runs only in the client | ||
return { name: 'Arunoda' } | ||
} | ||
|
||
render() { | ||
const { name } = this.props | ||
return ( | ||
const Index = ({ name }) => { | ||
return ( | ||
<div> | ||
<h1>Home Page</h1> | ||
<p>Welcome, {name}</p> | ||
<div> | ||
<h1>Home Page</h1> | ||
<p>Welcome, {name}</p> | ||
<div> | ||
<Link href="/about"> | ||
<a>About Page</a> | ||
</Link> | ||
</div> | ||
<Link href="/about"> | ||
<a>About Page</a> | ||
</Link> | ||
</div> | ||
) | ||
</div> | ||
) | ||
} | ||
|
||
export default Index | ||
|
||
export async function getStaticProps() { | ||
// The name will be generated at build time only | ||
const name = faker.name.findName() | ||
|
||
return { | ||
props: { name }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.