This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 29
Object.defineProperty(NextImage, '__esModule', descriptor) is no more needed from [email protected] #95
Comments
Thanks for opening up this issue. When next.js releases the next version, I'll happily update this repo or accept any PRs to make this library work with it |
tubbo
added a commit
to tubbo/storybook-addon-next
that referenced
this issue
Jun 28, 2022
NextJS no longer requires a bit of code added in to patch a bug that existed in Next v12.1.5 and above. As of v12.2.0, this patch is no longer needed, and furthermore causes a `TypeError` to be thrown when attempting to ugprade to Next 12. Fixes: RyanClementsHax#95 Related: RyanClementsHax#72
Do we need to make any changes to this snippet in our storybook preview.js file with this PR?
|
🎉 This issue has been resolved in version 1.6.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Otoris I believe that is no longer needed. The addon should do everything for you. If you come by any other issues feel free to open another issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Storybook will throw an error
TypeError: Cannot redefine property: __esModule
at this line with using [email protected] or later.Your minimal, reproducible example
none
Steps to reproduce
Expected behavior
Working Storybook
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
storybook-addon-next version
v1.6.6
Additional context
I did some digging and found that the default import of
next/image
has been fixed by this PR.The built code looks like following, so you need not to redefine
__esModule
property on next-image-stub.tsx.Related issues
The text was updated successfully, but these errors were encountered: