Skip to content

Conversation

@Sidnioulz
Copy link
Member

See Sidnioulz/storybook-addon-tag-badges#124. It turns out we do need dts.

What I'm not sure about is if we expect any side effect from producing dts for manager itself.

@JReinhold
Copy link
Collaborator

I guess this makes sense. It's unfortunate, because in 95% of the cases this will be unnecessary, as most addons dont have manager helpers.

Copy link
Member

@ndelangen ndelangen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @JReinhold that this is not needed in the vast majority of addons, and so we should optimize for those, and not add this.

@Sidnioulz
Copy link
Member Author

I agree with @JReinhold that this is not needed in the vast majority of addons, and so we should optimize for those, and not add this.

In that case, we should likely remove manager-helpers, as the example in the addon-kit doesn't fully work out of the box.

The goal of adding it was to help users figure out a safe way to have manager code bundled without preview externals (which leads to hard-to-debug bugs when end users of the addon build Storybook).

As externals have been streamlined, it's entirely possible this is no longer relevant in Storybook 10. And then if we can just mix up additional exports that get used in preview or manager, we might want to have entries just for that in the tsup config. We could call them exportEntries or something 🧌

Should we discuss this as the weekly triage? I feel we need to decide if we want the addon-kit to cover more use cases out of the box, or to cover the general case only.

@Sidnioulz
Copy link
Member Author

https://discord.com/channels/486522875931656193/1434050290956369931/1435868953095180338 is another example of addon where exposing DTS would help addon authors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants