-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add support for multiple webpack chunks in iframe #1083
Conversation
This allows an arbitrary number of files to be loaded into the iframe, not just the single `preview.bundle.js` file. Webpack plugins can output chunks in a separate file. In dev, since file names are predictable, I can add the js file into a head.html file. When building storybook statically, however, js files have a hash added to them, so this doesn't work. This change makes the static build parse all webpack chunks and load them in the iframe (excluding the manager script), instead of only including known files.
@apexskier Can you please review and test? |
Codecov Report
@@ Coverage Diff @@
## master #1083 +/- ##
=========================================
Coverage ? 13.64%
=========================================
Files ? 207
Lines ? 4640
Branches ? 517
=========================================
Hits ? 633
Misses ? 3555
Partials ? 452
Continue to review full report at Codecov.
|
Can someone please review? |
This is a replacement PR for #677
This allows an arbitrary number of files to be loaded into the iframe,
not just the single
preview.bundle.js
file.Webpack plugins can output chunks in a separate file. In dev, since
file names are predictable, I can add the js file into a head.html file.
When building storybook statically, however, js files have a hash added
to them, so this doesn't work.
This change makes the static build parse all webpack chunks and load
them in the iframe (excluding the manager script), instead of only
including known files.