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

fix: make latest storybook-builder-wds work #3409

Merged
merged 7 commits into from
Jul 13, 2023

Conversation

bashmish
Copy link
Contributor

@bashmish bashmish commented Jul 3, 2023

Description

Hey, hope this helps with the new builder (https://github.com/bashmish/storybook-builder-wds) and Storybook 7.

Related issue(s)

Motivation and context

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@@ -155,7 +155,7 @@
"fs-extra": "^10.0.0",
"geckodriver": "4.0.3",
"gh-pages": "^4.0.0",
"glob": "^10.3.0",
"glob": "^8.0.0",
Copy link
Contributor Author

@bashmish bashmish Jul 3, 2023

Choose a reason for hiding this comment

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

had to downgrade it, the latest one has CJS and MJS and the glob-promise is using the wrong one, didn't investigate further

package.json Outdated Show resolved Hide resolved
import path from "path";
-import sourceMapDefault from "@parcel/source-map";
-var { default: SourceMapNode } = sourceMapDefault;
+import SourceMapNode from "@parcel/source-map";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I raised an issue here chialab/rna#155

@Rajdeepc
Copy link
Contributor

@bashmish
Copy link
Contributor Author

@Rajdeepc hey, interesting link, thanks!

here I'm testing the new builder I'm working on that @Westbrook is interested in

@Rajdeepc
Copy link
Contributor

Rajdeepc commented Jul 10, 2023

@Rajdeepc hey, interesting link, thanks!

here I'm testing the new builder I'm working on that @Westbrook is interested in

I am happy to see the official addons support. Its a game changer on the new Storybook and also would love to chat about any plans to onboard webpack5 lazyCompilation support here? Its faster and on demand. In the mean time I will get this setup locally and play around

@bashmish
Copy link
Contributor Author

bashmish commented Jul 10, 2023

@Rajdeepc not sure I get you, this new builder is not webpack5 based and generally not related to webpack. It's implementing the preview of the stories using @web/dev-server and new Storybook Builder API (https://storybook.js.org/docs/react/builders/builder-api) and as such it gets certain behavior from @web/dev-server that people who are already using it might be interested in. I'd say lazy compilation (in general) is one of it's features out of the box. This builder is meant to be used instead of official builders (webpack or vite).

@Westbrook
Copy link
Contributor

Thanks so much for this @bashmish! If you were OK with signing the CLA, we can merge this into our WIP branch. This is gonna go a long way to getting us onto sb@7, soon!!

@bashmish bashmish changed the title fix: make it work with latest version in github branch fix: make latest builder work Jul 11, 2023
@bashmish bashmish changed the title fix: make latest builder work fix: make latest storybook-builder-wds work Jul 11, 2023
clearTerminalOnReload: false,
mimeTypes: {
'**/*.json': 'js',
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to disable watch mode here, will investigate together with HMR
for now the server is run in middleware mode as other builder, so watch mode will require a bit different approach

@bashmish
Copy link
Contributor Author

Thanks so much for this @bashmish! If you were OK with signing the CLA, we can merge this into our WIP branch. This is gonna go a long way to getting us onto sb@7, soon!!

Sure, signed the CLA. Good luck and as always I'm here to help if you run into other issues. I'll work on other features too in the nearest future, stay tuned for updates :)

Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

Thanks @bashmish! May take a while yet to get this all the way to main, but you've been a big help in getting us there.

@Westbrook Westbrook merged commit 3599817 into adobe:storybook Jul 13, 2023
6 of 8 checks passed
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.

None yet

3 participants