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

Added webpack watch option support. #2605

Closed
wants to merge 1 commit into from
Closed

Added webpack watch option support. #2605

wants to merge 1 commit into from

Conversation

adaltavo
Copy link

@adaltavo adaltavo commented Jun 23, 2017

I had the necesity to work on a development environment without using webpackDevServer and using a direct implementation of my app from another backend.

Webpack watch option was the best solution for this, and I was concerned that It wasn't avialable (yet) in create-react-app project.

With this branch now just simply run "npm run watch" for webpack to listen for changes and generate a bundle.js file under build/static/js folder.

    I had the necesity to work on a development environment without using webpackDevServer and using a direct implementation of my app from another backend.
    Webpack watch option was the best solution for this, and I was concerned that It wasn't avialable (yet) in create-react-app project.

    With this branch now just simply run "npm run watch" for webpack to listen for changes and generate a bundle.js file under build/static/js folder.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon
Copy link
Contributor

gaearon commented Jun 26, 2017

Thanks for the PR! I don't think we'll be adding a third config at this point, but this issue is on our radar and we hope to get to it in the future.

It is tracked in #1070.

@gaearon gaearon closed this Jun 26, 2017
@adaltavo
Copy link
Author

Thanks for you replay!, I know It can make the things more confusing, but for me was the easiest solution, and also required, since .dev has specific configuration for webpackdev server making the app to log many errors on console, and .prod generates a file with a unique hash everytime is compiled, and also it minifies the code, making compiling times so long. I hope you really add this feature in the future, for me (and as I can see, for many others) is a really important missing feature since sometimes (so often in my opinion) you need your app to be tested outside from webpackdevserver environment, and since it doesn't and can't generate a bundle, this is the easiest approach to solve this problem.

@AttitudeL
Copy link

AttitudeL commented Mar 4, 2018

Thank you so much for this! It saved my day! I am facing an issue that I am booting up the frontend code by spring-boot. Even though I enabled "proxy" setting from the package.json file, it won't bypass the oauth redirect CORS. So I need some way to constantly watching the frontend code from /target/classes/static directory where spring-boot serves the frontend code. With just a little effort, your solution worked as charm to solve my problem and now I'm able to develop the frontend so much faster without having to either acquiring session id by hacking my oauth server or recompile the entire frontend code whenever I made a change.

Thank you again for your great work and hopefully they will include this feature and provide a way to specify target directory soon.

@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants