compdemocracy / polis

:milky_way: Open Source AI for large scale open ended feedback
https://pol.is
GNU Affero General Public License v3.0
719 stars 170 forks source link

Modify Makefile, docker-compose, and Dockerfile to support 'webpack --mode=development' #1704

Open crkrenn opened 11 months ago

crkrenn commented 11 months ago

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:

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".

ballPointPenguin commented 10 months ago

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.

metasoarous commented 10 months ago

Confirming; Yes, this is a good idea that we'll want to incorporate as default dev mode behavior (executable via make dev start).

crkrenn commented 10 months ago

Thanks!