Latest Results
ENG-9153: Add preview run mode (#6663)
* Add dev-build run mode
`reflex run --env dev-build` hot reloads like `dev`, but instead of running
the Vite dev server it serves a freshly built (un-minified) frontend bundle
mounted into the backend on a single port. Each backend hot reload re-runs the
frontend build against the newly compiled output; a manual browser refresh
shows changes. This trades the always-on Vite dev server's overhead for cold
rebuilds while staying close to dev semantics.
To keep rebuilds fast and output debuggable, dev-build disables (overridable):
- JS + CSS minification (VITE_MINIFY -> build.minify / build.cssMinify)
- autoprefixer (REFLEX_NO_AUTOPREFIXER, read by the generated postcss.config.js)
- sourcemaps stay off (the default)
Also threads VITE_MINIFY into the vite config, restricts `export --env` to
dev/prod, and fixes `run`'s env parsing to honor the new value.
* dev-build: address review feedback + add changelog
- app.py: guard build.build() on hot reload so a failed frontend build keeps
serving the previous build instead of taking the backend down.
- postcss.config.js: make REFLEX_NO_AUTOPREFIXER honor falsy values ("false",
"0", "") so the override actually works; keep the autoprefixer entry on a
single line for the tailwind config rewriters.
- Send a distinct "run-dev-build" telemetry event.
- Add news fragments for reflex and reflex-base.
* dev-build: apply biome formatting to postcss.config.js template
* Rename dev-build mode to preview
Per review feedback, align the new run mode's name with the frontend-ecosystem
convention (Vite/Next/Nuxt 'preview').
* preview: drop internal=True on REFLEX_NO_AUTOPREFIXER so the name matches what postcss.config.js reads
* fix: fail hard when the preview hot-reload frontend build fails
build() deletes the previous output before building, so the old
"serving the previous build" fallback was serving nothing at all.
Let the failure propagate instead of masking it.
* fix: address review findings on preview mode
Accept y/yes in the postcss REFLEX_NO_AUTOPREFIXER check to match
interpret_boolean_env, and include "preview" in LITERAL_ENV so the
run --env annotation matches the accepted values (export keeps its
narrower dev/prod literal).
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Farhan <www.mfarvirus@gmail.com> Latest Branches
0%
0%
0%
FarhanAliRaza:fix-flaky-memo-test © 2026 CodSpeed Technology