mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Update readme.md (#1818)
This commit is contained in:
parent
b52b91a840
commit
a903503d41
|
@ -710,7 +710,7 @@ Here's an example `.babelrc` file:
|
||||||
To set up a CDN, you can set up the `assetPrefix` setting and configure your CDN's origin to resolve to the domain that Next.js is hosted on.
|
To set up a CDN, you can set up the `assetPrefix` setting and configure your CDN's origin to resolve to the domain that Next.js is hosted on.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const isProd = process.NODE_ENV === 'production'
|
const isProd = process.env.NODE_ENV === 'production'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// You may only need to add assetPrefix in the production.
|
// You may only need to add assetPrefix in the production.
|
||||||
assetPrefix: isProd ? 'https://cdn.mydomain.com' : ''
|
assetPrefix: isProd ? 'https://cdn.mydomain.com' : ''
|
||||||
|
|
Loading…
Reference in a new issue