While Expo itself may incorporate the non-standard approach of putting mode into env other tooling that interprets Webpack configuration files follow the API documentation, resulting in env validation failing.
Environment
N/A
Please specify your device/emulator/simulator platform, model and version
N/A
Error output
Error: @expo/webpack-config requires a validmodestring which should be one of: development, production, none
Reproducible demo or steps to reproduce from a blank project
Summary
Per the Webpack 5 documentation, https://webpack.js.org/configuration/configuration-types/#exporting-a-function the
mode
property belongs on theargv
object, not theenv
object.While Expo itself may incorporate the non-standard approach of putting
mode
intoenv
other tooling that interprets Webpack configuration files follow the API documentation, resulting inenv
validation failing.Environment
N/A
Please specify your device/emulator/simulator platform, model and version
N/A
Error output
Error: @expo/webpack-config requires a valid
modestring which should be one of: development, production, none
Reproducible demo or steps to reproduce from a blank project
Just run
webpack
without theenv mode=development