-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Support NODE_ENV in webpack #10245
Support NODE_ENV in webpack #10245
Conversation
silverwind
commented
Feb 11, 2020
•
edited
Loading
edited
- Set webpack to development mode when NODE_ENV=development.
|
Simplified so we can now use parallel make jobs to run both targets in parallel: make build && make -j2 run webpack-dev Of course, users are free to start gitea however they like and run |
Codecov Report
@@ Coverage Diff @@
## master #10245 +/- ##
==========================================
- Coverage 43.71% 43.69% -0.03%
==========================================
Files 586 586
Lines 81351 81351
==========================================
- Hits 35565 35547 -18
- Misses 41389 41404 +15
- Partials 4397 4400 +3
Continue to review full report at Codecov.
|
There is a issue with the run argument filtering |
Maybe I'll just change it so a simple |
Marking as WIP for now. I'm still looking for a better solution to start the gitea server in the background for webpack development. |
It would be better to add code to Gitea that would start webpack watch in background with special flag |
ad2cb34
to
f86a2b0
Compare
@lafriks yes, that would be ideal, but it's probably not within my abilities. Reduced the changes in this PR so it's not only about adding |
Source maps set on There seems to be an issue with the production source maps (I think browsers may try to retrieve them on the wrong URL) but it's unrelated to this PR and master is also affected. |
@silverwind I created golang package that can be used for this built into Gitea binary: https://github.com/lafriks/go-spaproxy |
@lafriks feel free to take over with another PR. Did you really get hot reloading to work? That'd be even more awesome than |
Hot reloading will work only for spa apps but would be good if we could at least get watch included in Gitea binary so you would not have run multiple commands |
Yeah, I assume as long as webpack is not in control of HTML, you can not really get hot reloading to work, at least not without major hacks. |
Removed the Makefile changes, so this PR is now only about supporting |