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

5.0.0-rc.1 (or earlier): need Webpack config externals support #357

Closed
kohlmannj opened this issue Mar 16, 2017 · 7 comments
Closed

5.0.0-rc.1 (or earlier): need Webpack config externals support #357

kohlmannj opened this issue Mar 16, 2017 · 7 comments
Milestone

Comments

@kohlmannj
Copy link

kohlmannj commented Mar 16, 2017

The Problem

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:

  • We can't directly install via NPM or subsequently bundle with Webpack
  • Expects to be loaded onto a page either via a <script> tag or RequireJS
  • Depends on jQuery, which must also be loaded via a <script> tag or RequireJS

Passing 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.

Your style guide config (styleguide.config.js).

Please refer to the Reproducible Demo project (direct link to its styleguide.config.js).

Testing Environment

  • Webpack version: 2.2.1
  • Operating system: macOS Sierra 10.12.3
  • react-styleguidist v5.0.0-rc.1
  • Node v7.6.0
  • NPM v4.1.2

Reproducible Demo

kohlmannj/styleguidist-5.0.0-rc.1_externals-example

Thank you!

@kohlmannj kohlmannj changed the title 5.0.0-rc.1 (or earlier): need externals support 5.0.0-rc.1 (or earlier): need Webpack config externals support Mar 16, 2017
@sapegin
Copy link
Member

sapegin commented Mar 16, 2017

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.

@sapegin
Copy link
Member

sapegin commented Mar 16, 2017

We may rename it to dangerouslyUpdateWebpackConfig and remove deprecation message 💀

@kohlmannj
Copy link
Author

kohlmannj commented Mar 16, 2017

@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.

@sapegin
Copy link
Member

sapegin commented Mar 16, 2017

I think removing externals by default is the desired behavior in the most use cases. But I may be wrong ;-)

@kohlmannj
Copy link
Author

@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.

@sapegin sapegin added this to the 5.0.0 milestone Mar 16, 2017
@sapegin
Copy link
Member

sapegin commented Mar 16, 2017

Let’s keep this issue open — I may do it before the final release ;-)

@sapegin
Copy link
Member

sapegin commented Mar 29, 2017

Out in react-styleguidist@5.0.0-rc.2 ;-)

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

No branches or pull requests

2 participants