Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update to storybook@6 and more #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Westbrook
Copy link
Contributor

Looking at update to Storybook@6+ and most things seem copacetic.

There is one case where the build currently converts the following code found in @storybook/web-components/dist/client/preview/render.js:

var _litHtml = require("lit-html");

to

import f from 'lit-html';

Which fails in that lit-html does't not provide a default export.

Any thoughts on how to manage that?

When we find the right settings to correct that, I'd love to see this published as a major version bump of Storybook Prebuilt so that users can opt-in to using it. There are some public API changes to src/core-events.js where the corresponding exports in Storybook have been removed/changed. Sound good?

@Westbrook
Copy link
Contributor Author

Things work a little more here, however I'm having a lot of trouble faking all the pathing via yarn link and wonder if it would be OK to start publishing alpha releases on this. Not sure if we'd also need to publish some alpha releases of @open-wc/demoing-storybook and storybook-web-coponents-knobs as well, yet, but it's possible. Similarly, there could be some web-dev-server-foo that should be on by default to support this linking workflow, but 🤷 .

I've bumped into one other "breaking" change in theming/create.js. Previously, this would export a create method for creating a theme, but in the new build it exports __moduleExports, that has a create member, instead.

Thoughts of these two points?

@LarsDenBakker
Copy link
Member

__moduleExports is an artifact from the rollup build

I think we can force creation of a named export by doing

export { create } from '@storybook/theming/create.js';

in https://github.com/open-wc/storybook-prebuilt/blob/master/src/theming/create.js

@Westbrook
Copy link
Contributor Author

That got create included again! Thanks.

@LarsDenBakker
Copy link
Member

Great! I think an alpha release is a good idea

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.

2 participants