Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS: Fix Image Context re-use via singleton #24146

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions code/frameworks/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,9 @@
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./image-context": {
"types": "./dist/image-context.d.ts",
"require": "./dist/image-context.js",
"import": "./dist/image-context.mjs"
},
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
"./dist/image-context": {
"types": "./dist/image-context.d.ts",
"require": "./dist/image-context.js",
"require": "./dist/image-context.mjs",
"import": "./dist/image-context.mjs"
},
"./preset": {
Expand Down
6 changes: 0 additions & 6 deletions code/frameworks/nextjs/template/stories/Image.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ export const Lazy = {
width: 50,
height: 50,
},
parameters: {
// ignoring in Chromatic to avoid inconsistent snapshots since the image is sometimes not loaded in time
chromatic: { disableSnapshot: true },
},
decorators: [
(Story) => (
<>
Expand All @@ -78,8 +74,6 @@ export const Lazy = {
export const Eager = {
...Lazy,
parameters: {
// ignoring in Chromatic to avoid inconsistent snapshots since the image is sometimes not loaded in time
chromatic: { disableSnapshot: true },
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
nextjs: {
image: {
loading: 'eager',
Expand Down