From 8575f75c28b67e7505b0f058b5e7071d4c6be596 Mon Sep 17 00:00:00 2001 From: Martin Nabhan <7613182+martinnabhan@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:31:09 +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 d2209cc030a3..b7f90a9bd7b5 100644 --- a/code/frameworks/nextjs/package.json +++ b/code/frameworks/nextjs/package.json @@ -27,15 +27,10 @@ "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", - "import": "./dist/image-context.mjs" + "import": "./dist/image-context.js" }, "./preset": { "types": "./dist/preset.d.ts", diff --git a/code/frameworks/nextjs/template/stories/Image.stories.jsx b/code/frameworks/nextjs/template/stories/Image.stories.jsx index 46ef28363830..7a8803a6e992 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',