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

Storybook does not build with vite 2.7.0-beta.4 #171

Closed
IanVS opened this issue Dec 3, 2021 · 2 comments · Fixed by #174
Closed

Storybook does not build with vite 2.7.0-beta.4 #171

IanVS opened this issue Dec 3, 2021 · 2 comments · Fixed by #174
Assignees

Comments

@IanVS
Copy link
Member

IanVS commented Dec 3, 2021

I attempted to update to the latest vite alpha, and found that storybook would not build correctly. I got this error from rollup:

Could not resolve entry module (iframe.html).
ERR! Error: Could not resolve entry module (iframe.html).

It seems that we'll need to make an update to our logic in resolveId, because the full url is provided now, like /Users/ianvs/code/project-root/iframe.html. rather than just iframe.html like we are checking for (https://github.com/eirslett/storybook-builder-vite/blob/main/packages/storybook-builder-vite/code-generator-plugin.js#L47)

@IanVS IanVS changed the title Storybook does not build with vite 2.7.0-alpha.10 Storybook does not build with vite 2.7.0-beta.4 Dec 6, 2021
@IanVS
Copy link
Member Author

IanVS commented Dec 6, 2021

I've tracked this down to vitejs/vite#5601, looks like rollupOptions.input paths are now being resolved. So maybe we were just relying on a bug, previously. This should be a fairly straightforward fix, and I think we can do it in a backwards-compatible way.

@IanVS IanVS self-assigned this Dec 7, 2021
@IanVS IanVS closed this as completed in #174 Dec 7, 2021
IanVS added a commit that referenced this issue Dec 7, 2021
Fixes #171 

Also updates our examples to 2.7.0.

I also tested this change before updating the examples, and confirmed it works with vite 2.6 as well.
@IanVS
Copy link
Member Author

IanVS commented Dec 7, 2021

https://github.com/eirslett/storybook-builder-vite/releases/tag/v0.1.11 has been released on npm, which supports vite 2.7.0.

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 a pull request may close this issue.

1 participant