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.
fix: image config not work for `node_modules` Co-authored-by: Steven <steven@ceriously.com>
- Loading branch information
Showing
9 changed files
with
204 additions
and
49 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
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,12 @@ | ||
import React from 'react' | ||
import { | ||
ImageConfigComplete, | ||
imageConfigDefault, | ||
} from '../../server/image-config' | ||
|
||
export const ImageConfigContext = | ||
React.createContext<ImageConfigComplete>(imageConfigDefault) | ||
|
||
if (process.env.NODE_ENV !== 'production') { | ||
ImageConfigContext.displayName = 'ImageConfigContext' | ||
} |
5 changes: 5 additions & 0 deletions
5
test/integration/image-component/image-from-node-modules/next.config.js
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,5 @@ | ||
module.exports = { | ||
images: { | ||
domains: ['i.imgur.com'], | ||
}, | ||
} |
Oops, something went wrong.