-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
devServer block in webpack.config.dev.js not being used after npm run eject #323
Comments
This sounds like the way webpack works—not something we could fix. (Yep, it can be confusing 😄 ) Would this new option solve your problem? |
Could the start.js script2 be tweaked to use `config.devServer, if found? Users could then edit webpack config to add things like proxy configuration in the standard way, without having to modify create-react-app scripts. |
WepackDevServer CLI command does a whole ton of stuff to that config before feeding it to WebpackDevServer Node API. If we implement support for |
@gaearon thanks for the explanation, and I can understand our needs might not be a general case. Would #282 let us proxy path patterns (e.g. Alternatively we can just On that note - have you guys had any thoughts on upgrading a created app? Do you see it as a helper that's just there at project setup time, or something projects can stick with and update to new releases? |
It lets you specify a single fallback server that would be used for any unrecognized path. If you have feedback on other use cases (e.g. you have multiple API servers?) please leave a comment in #282.
Changelog has detailed instructions on updating. Usually it’s a matter of bumping |
As I said above this will not work as you expect from |
I executed the
npm run eject
command to have more control on the webpack configuration. I needed a proxy in the devServer.start.js
doesn't seem to use that configuration when creates the development server because proxy was not working. Executingwebpack-dev-server --config config/webpack.config.dev.js
, the proxy works properly.Finally adding the proxy configuration in the script https://github.com/facebookincubator/create-react-app/blob/master/scripts/start.js#L154 solved the issue.
The text was updated successfully, but these errors were encountered: