brio50 / divisor

Convert metric measurements to imperial and round decimal values to fractions based on your desired divisor - 1/64, 1/32, 1/16, 1/8, and 1/4
https://brio50.github.io/divisor/
MIT License
0 stars 0 forks source link

Webpack Optimization #4

Closed brio50 closed 1 year ago

brio50 commented 1 year ago

Production

The npm command I use to build executes webpack in developer mode. The deployed website, https://divisor.onrender.com/, loads slowly on my phone. Use official guidance to convert to production mode. I'm not going to install another plugin, the webpack command can take a command line argument, i.e. mode=production

I think this will "minify" css and js in the project, hopefully speeding up loading time.

brio50 commented 1 year ago

Improve package.json for Development

I think I can add venv/Scripts/flask --app divisor run --debug to one of pacakge.json's fields. Maybe npm run build is cached, and can be combined with some other scripts stage to compile javascript then start the flask server for local development.

brio50 commented 1 year ago

https://github.com/brio50/divisor/commit/cf302f034b6cbf97d1f24278f339e08631ac31d2 seriously improved this project. See CONTRIBUTING.md to learn how deployment works, as well as testings. https://github.com/facebook/create-react-app/ made my life so much easier, even testing is better now - one command for compile and web server refresh!