Closed mnigh closed 1 year ago
Should the refresh scripts and setup.sh be executing npm run production instead of npm run dev for consistency across environments?
I understand this different between local and prod environments to be very standard.
npm run dev
vs production
is different because we do want different builds for development -- for example, react component profiling is something one would want in development environment and not in production, and there are some other things that one might want different (sourcemaps, minification). By as practical example, try to open react tab of chrome devtools on production, and the component tree names are all obfuscated, flamegraphs don't work, many helpful console errors are stripped, and I'm sure there are other things
The place where we could catch this would be UAT, which should be built with the same scripts as production.
Having said this, we could def run unit tests and cypress tests on a more prod-like build though, and that's prob doable!
Having said this, we could def run unit tests and cypress tests on a more prod-like build though, and that's prob doable!
Yes, I think we should. Perhaps we can set an environment variable somewhere in setup.sh that allows to set the npm run
script as dev (locally) or production (github workflows)?
Related: This inconsistentcy will now fail tests against npm run dev
until #4798 is resolved
Description
The refresh scripts execute
npm run dev
locally but the deploy script executesnpm run production
. Same goes for the setup.sh script that executesnpm run dev
and is used in the e2e-tests github workflow.Question
Should the refresh scripts and setup.sh be executing
npm run production
instead ofnpm run dev
for consistency across environments?