Skip to content

reflex compile should not actually install frontend deps #6478

@masenf

Description

@masenf

Describe the Enhancement you want

I want a compilation mode for reflex that generates the output javascript app and updates package.json and bun.lock without actually installing the frontend packages. This would allow me to subsequently run bun install --frozen-lockfile and bun run dev to start the development server without having to run through reflex. It would also be cool if the output was made pretty and stable when using this interface so the generated code and artifacts could be checked in and tracked for changes.

  • Which feature do you want to improve? (and what problem does it have)

reflex compile installs packages for "no reason" since it doesn't actually run the app.

  • What is the benefit of the enhancement?

It would make more semantic sense if reflex commands had the following structure:

  • reflex init - creates a new app / refreshes the common templated frontend files
  • reflex compile - performs init, if needed. generates frontend javascript app and package.json / bun.lock
  • reflex run - performs compile, if needed. installs frontend packages and starts frontend+backend
  • reflex export - performs compile, if needed. produces static frontend export for running in prod mode or externally

In some deploy or testing use cases, it's helpful to break up these steps. Particularly it would be nice to not have to recompile to export or run when recompiling is not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAnything you want improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions