In short, losing support for externals in the Webpack config passed to Styleguidist is a blocker, and would potentially keep our internal style guide dependent on rsg v5.0.0-beta.13.
At least one of our components depends on a library which:
<script> tag or RequireJS<script> tag or RequireJSPassing externals through to Styleguidist, plus a modified HTML template, has worked around these limitations in the past. Unfortunately, this workaround is no longer possible in v5.0.0-rc.1. It _did_ work as recently as react-styleguidist v5.0.0-beta.13, however.
styleguide.config.js).Please refer to the Reproducible Demo project (direct link to its styleguide.config.js).
kohlmannj/styleguidist-5.0.0-rc.1_externals-example
Thank you!
You can still use updateWebpackConfig option — it has no restrictions. It’s marked as deprecated because we want to know all use cases where other options are not enough and encourage users to migrate to new options.
We may rename it to dangerouslyUpdateWebpackConfig and remove deprecation message 💀
@sapegin I see…turns out I had (quite happily) migrated away from updateWebpackConfig in that very spirit! If this is the only envisioned mechanism by which externals would work in the future, I'd appreciate dangerously over deprecation.
I think removing externals by default is the desired behavior in the most use cases. But I may be wrong ;-)
@sapegin Yup, I agree! My main concern is that there's a way to do this at all, long-term. Again, that seems to be a 👎🏼 on entirely deprecating updateWebpackConfig.
Let’s keep this issue open — I may do it before the final release ;-)
Out in [email protected] ;-)
Most helpful comment
Let’s keep this issue open — I may do it before the final release ;-)