-
Notifications
You must be signed in to change notification settings - Fork 214
Conversation
I have a branch locally where I've added a few more changes on top of this PR, however I think it might be useful to discuss the expected UX for the various combinations of options. A)
|
@edmorley reading through all of that, I think I am mostly in agreement. For option C, I think throwing is acceptable since webpack technically also is supposed to throw if no mode is set. Are there any options where you feel torn and you'd like me to weigh my opinion to tie-break? |
Scenario B is one I'm not sure about what we should do. |
Another argument for (1), is that webpack uses As such, if we went with (2), using |
Previously the only way to override `mode` was by passing `--mode` on the command line. However this is not possible with all tools, since some (such as karma) reject unrecognised arguments. Now: * `mode` is derived from `NODE_ENV` if `--mode` wasn't passed, and !production `NODE_ENV` falls back to mode `development`. * if `--mode` is passed, it takes priority over `NODE_ENV`. * if neither `mode` nor `NODE_ENV is defined, then `NODE_ENV` is set to `production`, however `mode` is left undefined, which causes webpack to output a helpful warning about relying on defaults. * the template test runner configs set a default `NODE_ENV` of `test`. * `@neutrinojs/stylelint` now also correctly sets `failOnError`. Fixes #900. Fixes #971. Closes #955.
Fixes #900.
This is just an initial patch, needs a review to push this forward more.