I have a nodejs backend that serves up the react front end(later I can do CDN probably) and for now, I plan on disallowing CORS so react must talk to my nodejs backend only. The prototype for this is minimal code and on github https://github.com/deanhiller/ts-prototype
What I am trying to figure out is how to launch this in a docker container BUT stripped of all the extra files (such as all the *.ts files found in node_modules). Ideally, the docker container should only contain the code needed to run nodejs and the javascript code of the react application (plus javascript libs – albeit compiled from original typescript in many cases).
How does one make this happen as I see a compile only puts my .ts files into dist/.js files but I do not see any movement on the node_modules/*.js files to be put anywhere.
Is there no way to do this to keep my docker image small so uploads from CI/CD are very quick?
tried the basic tutorials but they all seem to include all the extra files 🙁 .