From bc8a4966794fe0b92ecd41b851134f432efc3567 Mon Sep 17 00:00:00 2001 From: Martin Nabhan <7613182+martinnabhan@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:23:30 +0900 Subject: [PATCH] Use the same Image Context for ESM and CommonJS --- code/frameworks/nextjs/package.json | 7 +------ code/frameworks/nextjs/template/stories/Image.stories.jsx | 6 ------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/code/frameworks/nextjs/package.json b/code/frameworks/nextjs/package.json index a9142100cf8..e98e1a07105 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -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" - }, "./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": { diff --git a/code/frameworks/nextjs/template/stories/Image.stories.jsx b/code/frameworks/nextjs/template/stories/Image.stories.jsx index 46ef2836383..7a8803a6e99 100644 --- a/code/frameworks/nextjs/template/stories/Image.stories.jsx +++ b/code/frameworks/nextjs/template/stories/Image.stories.jsx @@ -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) => ( <> @@ -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 }, nextjs: { image: { loading: 'eager',