queerviolet / bones

MIT License
36 stars 119 forks source link

Adjust build behavior based on dev vs prod? #21

Closed glebec closed 7 years ago

glebec commented 7 years ago

Webpack has a number of options for tailored behavior in dev vs production. For example: cheaper (but still useful) source maps in dev mode; minifying in production; gzipping in production. More info (for v2, mind you) can be found here.

This might add complexity to what is intended to be a small scaffolding base. On the other hand, it can save configuration time and act as a representative example for those interested in implementing such distinctions.

omriAckley commented 7 years ago

Maybe instead of built-in-from-the-start we talk about it during "deployment training"? I like that idea because then we can bring it up as an interesting option for students who want to try it out. If it's built-in from the start, I worry it'd feel more magical.

glebec commented 7 years ago

That makes sense to me. The biggest annoyance from not doing this OOB is performing the very slow full source map generation on every change in watch mode, when much faster and still-usable alternatives exist. My 2c. Perhaps we can enact at least that change, so students can use it as a model for further differentiation.

glebec commented 7 years ago

Included, but also set off by default, in https://github.com/FullstackAcademy/bones/commit/5e7415e5f44b2f88f8703a31ac60ebd06a870e04. There is more we could do, so I'll leave this open for now.