polis icon indicating copy to clipboard operation
polis copied to clipboard

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

Open crkrenn opened this issue 1 year ago • 3 comments

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

crkrenn avatar Aug 13 '23 00:08 crkrenn

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.

ballPointPenguin avatar Aug 18 '23 21:08 ballPointPenguin

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

metasoarous avatar Aug 18 '23 21:08 metasoarous

Thanks!

crkrenn avatar Aug 20 '23 19:08 crkrenn