-
-
Notifications
You must be signed in to change notification settings - Fork 864
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 webpack proxy, react-dev-tools hot client #312
Conversation
There's also the possibility to builld our own error overlay, but that would bring the extra burden of maintaining that one as well, while other really great solutions like |
…eware # Conflicts: # examples/basic/package.json # examples/with-custom-babel-config/package.json # examples/with-custom-webpack-config/package.json # examples/with-inferno/package.json # examples/with-jest-snapshots/package.json # examples/with-preact/package.json # examples/with-rax/package.json # examples/with-reason-react/package.json # examples/with-redux/package.json # packages/razzle-dev-utils/package.json
This is pretty amazing work. So thank you x1000000. Backwards compat is pretty important. Not because I personally care too much, but because Razzle's competition (CRA, Next, react-server, etc.) are really good about maintaining it. Thus, I would explore writing our writing our own overlay based on some of the work you have done, but as a separate package (perhaps called FYI, if we could figure out how to make Razzle work as simply node.js middleware (like next), I would totally be open to runtime a dep. |
Yea, I'd be interested in exploring that too. What's really great about next's error handling is that it also shows server side runtime/compile errors, something we probably can never do if we use CRA's error handling, would be really cool if we could add that to razzle as well. Regarding middleware: I basically had the entire client side compiling working as a middleware, shouldn't be too hard to add server compiling to that as well. |
Going to close this in favor of a from scratch based approach. |
😍
This fixes #284.
But, this is mostly a POC: it sacrifices a lot, sadly.
Notes:
webpack-hot-middleware
&webpack-dev-middleware
. It appearsreact-dev-utils/webpackHotDevClient
uses a couple of hardcoded features only available inwebpack-dev-server
(which is kind of hacky!)Sadly, this means we still need to run webpack on a seperate port; my goal was to completely eliminate the need of a separate webpack server, but this makes this pretty much impossible.
razzle-dev-utils
as a dependency. We could make the webpackProxy part of razzle itself, but it really feels a lot more like a dev util to me.Haven't been able to figure out why yet.