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 build-storybook with simplebar esm files #5816

Merged
merged 1 commit into from
Mar 2, 2019

Conversation

ndelangen
Copy link
Member

Issue: #5788

What I did

I changed a config for webpack for preview

Why

So after a bunch of experimentation and debugging, I found that simplebar & simplebar-react expose .esm.js AND .js AND .min.js files. For the preview configured it so it would load the .js file. Turns out that files doesn't work well within a webpack bundle.

Probably due to multiple polyfills.

I don't really have an explanation for why it worked in dev-mode.

@ndelangen ndelangen added the bug label Mar 1, 2019
@ndelangen ndelangen added this to the v5.0.0 milestone Mar 1, 2019
@ndelangen ndelangen self-assigned this Mar 1, 2019
@vercel
Copy link

vercel bot commented Mar 1, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

@codecov
Copy link

codecov bot commented Mar 1, 2019

Codecov Report

Merging #5816 into next will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff          @@
##           next   #5816   +/-   ##
====================================
  Coverage    34%     34%           
====================================
  Files       651     651           
  Lines      9473    9473           
  Branches   1345    1371   +26     
====================================
  Hits       3221    3221           
  Misses     5637    5637           
  Partials    615     615
Impacted Files Coverage Δ
...b/core/src/server/preview/iframe-webpack.config.js 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36364d6...82dcf05. Read the comment docs.

@ndelangen
Copy link
Member Author

@shilman shilman changed the title FIX https://github.com/storybooks/storybook/issues/5788 FIX build-storybook with simplebar esm files Mar 2, 2019
@shilman
Copy link
Member

shilman commented Mar 2, 2019

@ndelangen Thanks for figuring this out. You're a wizard 🧙‍♂️

@tmeasday
Copy link
Member

tmeasday commented Mar 2, 2019

Hmm.. this seems like a pretty big change no? Could users be relying on us resolving those those fields from package.json?

@ndelangen
Copy link
Member Author

@tmeasday I don't know why it was added, but it was 'recent'.

I added it here:
https://github.com/storybooks/storybook/blob/750831cbc3b0ef59beed6016e49cd5ae9b7b5467/lib/core/src/server/config/webpack.config.iframe.prod.js

But no longer know why..

@tmeasday
Copy link
Member

tmeasday commented Mar 2, 2019

All good then 😆

@ndelangen ndelangen merged commit 5d60575 into next Mar 2, 2019
@ndelangen ndelangen deleted the fix/official-example-iframe branch March 2, 2019 16:57
@shilman shilman added release patch:done Patch/release PRs already cherry-picked to main/release branch labels Mar 3, 2019
shilman pushed a commit that referenced this pull request Mar 3, 2019
FIX build-storybook with simplebar esm files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch:done Patch/release PRs already cherry-picked to main/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants