polis
polis copied to clipboard
Modify Makefile, docker-compose, and Dockerfile to support 'webpack --mode=development'
Problem: The current Makefile/docker build stack uses 'webpack --mode=production' by default. When adding new features to the static javascript/react code, it is helpful to use the Chrome console to examine the source code and execution flow but to do this effectively requires 'webpack --mode=development' so that the javascript source is not minified.
Suggested solution: I suggest modifying the Makefile, docker-compose, and client Dockerfiles to support "make STATIC-SOURCE start"; "make STATIC-SOURCE start-rebuild", etc.
Alternative suggestions:
- A quick and dirty solution is to modify file-server/Dockerfile to execute "RUN npm run build:dev" instead of "RUN npm run build:prod"
Additional context: Implementing this change is not of the highest priority because there are workarounds.
A related suggestion is to modify and test a "make DEV start" option, that might also incorporate "npm run build:dev".
This is a very good point. Better workflow for developers is a High Priority goal right now. So I'm currently working to update some aspects of Webpack for better prod vs dev concerns and this fits right in to that goal.
Confirming; Yes, this is a good idea that we'll want to incorporate as default dev mode behavior (executable via make dev start
).
Thanks!