Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using react, run npm/yarn/pnpm build while building the app #786

Open
assapir opened this issue Sep 26, 2024 · 2 comments
Open

When using react, run npm/yarn/pnpm build while building the app #786

assapir opened this issue Sep 26, 2024 · 2 comments
Milestone

Comments

@assapir
Copy link

assapir commented Sep 26, 2024

Description

If one tries to start their app which bundled with react frontend without building it first, they will an error stating Error: Message("one of the static path are not found, Folder frontend/distfallback:frontend/dist/index.html")

To Reproduce

Create a SaaS app with React frontend. run cargo loco run

Expected Behavior

Suggest to have a build.rs that will run the build for the fronted. Even better will be that if it's in dev mode, it will start the react app in dev mode

@jondot jondot added this to the 0.11.0 milestone Oct 13, 2024
@van-sprundel
Copy link

A build.rs would also run if we were to call something like cargo loco help. It seems like this would be a good feature for the cli though. cargo loco start would build the frontend before serving

@Sillyvan
Copy link
Contributor

I do like the idea of a dev mode that can run multiple processes in the background. like a frontend dev server, tailwind cli --watch, etc

@jondot jondot modified the milestones: 0.11.0, 0.12.0 Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants