From 6665210996a452e8c3fb11134d71752dc5d46a21 Mon Sep 17 00:00:00 2001 From: sonsurim Date: Tue, 22 Aug 2023 20:34:05 +0900 Subject: [PATCH 1/2] =?UTF-8?q?config:=20next/image=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .storybook/config/nextImage.js | 9 +++++++++ .vscode/settings.json | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .storybook/config/nextImage.js diff --git a/.storybook/config/nextImage.js b/.storybook/config/nextImage.js new file mode 100644 index 00000000..d88fe5f5 --- /dev/null +++ b/.storybook/config/nextImage.js @@ -0,0 +1,9 @@ +import * as NextImage from 'next/image' + +const OriginalNextImage = NextImage.default +Object.defineProperty(NextImage, 'default', { + configurable: true, + value: props => +}) + +export default OriginalNextImage diff --git a/.vscode/settings.json b/.vscode/settings.json index f8aad33f..5708a089 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,5 +12,8 @@ "source.fixAll.eslint": true, "source.fixAll.stylelint": true }, - "cSpell.words": ["stylelint"] + "cSpell.words": [ + "stylelint", + "unoptimized" + ] } From 2d6d7a001a12ae2b20d5f8801ac23866fa96be0e Mon Sep 17 00:00:00 2001 From: sonsurim Date: Tue, 22 Aug 2023 20:34:45 +0900 Subject: [PATCH 2/2] =?UTF-8?q?config:=20storybook=EC=97=90=20next=20image?= =?UTF-8?q?=20config=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .storybook/main.js | 2 ++ .storybook/preview.js | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index c7a65a56..4b3815e1 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -18,6 +18,8 @@ module.exports = { extensions: config.resolve.extensions }) ] + config.resolve.alias["next/image"] = require.resolve("./config/nextImage.js"); + return config } } diff --git a/.storybook/preview.js b/.storybook/preview.js index d1f8bb74..e14744f9 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,7 +1,6 @@ import { theme } from '@themes' import { ThemeProvider } from '@emotion/react' import { GlobalStyle } from '../src/styles' -import * as NextImage from 'next/image' export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, @@ -22,8 +21,5 @@ export const decorators = [ ) ] -const OriginalNextImage = NextImage.default -Object.defineProperty(NextImage, 'default', { - configurable: true, - value: props => -}) + +