Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

auto-configuration: don't duplicate addon registration #67

Open
ShaunEvening opened this issue Jul 11, 2023 · 3 comments
Open

auto-configuration: don't duplicate addon registration #67

ShaunEvening opened this issue Jul 11, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ShaunEvening
Copy link
Contributor

The auto configure script doesn't check to see if the addon already exists in the addon array before adding it again

@ShaunEvening ShaunEvening self-assigned this Jul 11, 2023
@ShaunEvening ShaunEvening added the bug Something isn't working label Jul 11, 2023
@ShaunEvening ShaunEvening changed the title auto-configure: don't duplicate addon registration auto-configuration: don't duplicate addon registration Jul 11, 2023
@dkario
Copy link

dkario commented Aug 5, 2023

Hi, I'm seeing the duplicate addon warning in a simple Storybook 7 set up with the @storybook/react-webpack5 framework and only '@storybook/addon-styling' in my addons array.

It looks like manager.ts, which includes the addons.register call, is getting included in two bundles that are both imported, so register is called twice. I can't figure out where each one is originally coming from. They each have different file contents since they have different imports that get inlined in the file. I see you followed the addon-kit template pretty closely too.

Screenshot 2023-08-04 at 5 25 49 PM Screenshot 2023-08-04 at 5 30 50 PM

@ShaunEvening
Copy link
Contributor Author

Hey @dkario your issue pertains to #80, this is a to-do item, specifically for the codemod

@dkario
Copy link

dkario commented Aug 17, 2023

Awesome, thanks for the update

@ShaunEvening ShaunEvening moved this from Todo to Done in Styling addon backlog Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants