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

Add option to embed frontend/dist in release build #1291

Open
jakobsack opened this issue Mar 7, 2025 · 1 comment
Open

Add option to embed frontend/dist in release build #1291

jakobsack opened this issue Mar 7, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@jakobsack
Copy link

jakobsack commented Mar 7, 2025

Feature Request

On your website you claim that Loco has a "one file deployment", but when using the API + frontend option then the frontend is not embedded in the binary. Thus, you always have to deploy the folder dist/frontend next to your binary.

Please add an option to embed the frontend files in the binary. Preferably, this should be implemented in a middleware. There should be a feature flag to enable this behaviour.

Workaround

In my own app I used rust-embed in a controller to embed the files. You find an example code in Discussion #1255 .

Existing implementations

Here is a list of libraries I've found when implementing my workaround:

@jakobsack jakobsack added the enhancement New feature or request label Mar 7, 2025
@kaplanelad
Copy link
Contributor

@jakobsack This is a good idea, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants