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

Add support for custom webpack loaders #199

Closed
gigabo opened this issue May 21, 2016 · 4 comments
Closed

Add support for custom webpack loaders #199

gigabo opened this issue May 21, 2016 · 4 comments
Labels
enhancement New functionality.

Comments

@gigabo
Copy link
Contributor

gigabo commented May 21, 2016

From reddit:

How do I use my own webpack loaders? i.e. I'd like to use CSS modules, maybe I have a markdown loader, etc.

We don't have a good answer to that with react-server-cli yet. Maybe via .reactserverrc?

@gigabo gigabo added enhancement New functionality. help wanted labels May 21, 2016
@tyler-dot-earth
Copy link

Some freeflow thoughts to help get the conversation started:

  • Imagining something like routes config (either CLI or .reactserverrc) where you can point it to a webpack.config file. Then you have the problem of loader ordering - are the configured loaders from the end-user's webpack used BEFORE the ones provided by react-server? Maybe there's concepts like afterBabelLoaderor afterServerLoaders? Seems a bit funky..
  • Loaders might cause some issues if they're not isomorphic-friendly, I imagine. (I also haven't tried something that uses window yet but curious to see how react-server handles it)

I'll definitely be poking through the source soon to see if there's anything I can help do to improve this issue, as it's probably the only thing really holding me back from using react-server.

@gigabo
Copy link
Contributor Author

gigabo commented May 21, 2016

Yeah it would be tough to automatically merge a whole webpack.config, though maybe webpack-merge could help? Targeted afterBabelLoader-type hooks might be easier to tame, but I wonder how many of them we'd eventually wind up with...

Thanks for looking at this @tsnieman!

@CreepGin
Copy link
Contributor

Agree with the complexity involved with custom webpack configuration. But in the case of CSS Modules, we can safely consider enabling it by default.

@gigabo
Copy link
Contributor Author

gigabo commented Nov 30, 2016

I think #598 took care of this (and #709 added a CLI option for it). 🎉

@gigabo gigabo closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New functionality.
Projects
None yet
Development

No branches or pull requests

3 participants