flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.62k stars 455 forks source link

Issue: Packaging without using `app.zip` and keeping it decompressed #3956

Closed jaluscgr closed 1 month ago

jaluscgr commented 2 months ago

Duplicate Check

Describe the requested feature

I'm trying to package my web app using flet build web, and it successfully creates a build. However, when I deploy it, the application fails to run correctly because the app.zip is too large, and it gets stuck during the decompression process.

I'd like to know how to modify the build process so that the app is already decompressed when it is used on the web, without having to rely on the app.zip. In other words, how can I configure the build to have the app decompressed and ready to use directly after deployment?

Steps to reproduce:

  1. Run flet build web to package the app.
  2. Deploy the app to the server.
  3. Start the app and wait for the app.zip to decompress.

Expected behavior:

The app should not require decompression of app.zip and should be ready to use immediately after deployment, with the folder structure already available.

Actual behavior:

The app gets stuck during the decompression of app.zip due to its large size.

Environment:

Suggest a solution

Suggested solution:

Is there a way to configure the build or deployment process to avoid using a zip file and instead have the app's folder structure ready to use in its decompressed form?

Thank you in advance for your help!

Screenshots

No response

Additional details

No response

FeodorFitsner commented 1 month ago

Pyodide works with a Python app located in its virtual file system. app.zip is unpacked into a browser's virtual file system with pre-served structure. Compared to a regular web app it's not a set of .js, .css, .html files and cannot be loaded file-by-file on demand.

Though why do you have such a huge zip? What are the dependencies, assets?