Webpacker: Use `development` as default mode

Created on 14 Feb 2019  路  3Comments  路  Source: rails/webpacker

If no specific mode configuration option is provided, Webpacker falls back to production. This will also trigger uglification of the code which can in return yield unexpected results in testing (e.g. searching for components that have their names altered) and also increased build times.

I suggest that we change this option to fall back to development

Most helpful comment

Generally it is better if someone does something wrong with their config, that they get a good production build and slow dev rebuilds.

That doesn鈥檛 make any sense. There is no library that runs production mode by default. Rails doesn鈥檛 do it and neither does webpack.

  1. Webpacker should have some sort of parity with the software it wraps.
  2. Webpack鈥檚 default config is development mode
  3. Production builds defeat the whole purpose of running a dev server.

All 3 comments

Generally it is better if someone does something wrong with their config, that they get a good production build and slow dev rebuilds. Than a large and slow production app and fast dev rebuilds.

Easy enough for a developer to look into why its slow and figure out they don't have development mode set. (Especially as you said, because the code will look weird in devtools)

Generally it is better if someone does something wrong with their config, that they get a good production build and slow dev rebuilds.

That doesn鈥檛 make any sense. There is no library that runs production mode by default. Rails doesn鈥檛 do it and neither does webpack.

  1. Webpacker should have some sort of parity with the software it wraps.
  2. Webpack鈥檚 default config is development mode
  3. Production builds defeat the whole purpose of running a dev server.

If it's ok for you feel free to close this isssue @kpelelis 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eriknygren picture eriknygren  路  3Comments

Eearslya picture Eearslya  路  3Comments

FrankFang picture FrankFang  路  3Comments

iChip picture iChip  路  3Comments

ankitrg picture ankitrg  路  3Comments