You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.
I would like to be able to distribute an entire web application as a compiled ahead-of-time executable that has all bundled dependencies, including the web app itself so that it can be used as a dependency free tool.
Once compiled, this single file should not need to download anything upon invocation. Specifically it should contain:
Deno.
reflex
react, react-dom, et al.
compiled app code
Things it should not need to do upon invocation:
d/l from esm.sh
d/l from deno.land
Ideally, it would not even need read/write access to the cache because the cache would have been pre-generated ahead of time.
Deno has support much of this with the deno compile command which downloads and compiles the tree of dependencies starting at its entry point, but where to put the web application and static assets is another matter. Upon cursory inspection, I found these libraries out there for bundling assets with an Deno executable.
In both cases, it appears that the assets themselves are encoded as binary data within typescript files. Reflex would just need to support some sort of adapter to load its cache and other assets from some type of store.
The text was updated successfully, but these errors were encountered:
Other considerations such as performance not withstanding, of the two bundlers, denobundle seems the best choice since it does not take over the full responsibility of deno compile like leaf does. Instead, you just compile your entire directory into a single typescript file but it does not prescribe what you do with that file.
Deno emit was split off into a module https://github.com/denoland/deno_emit and that also includes the bundle functionality. I'm just linking it here to document it :)
This is harder then it seemed before I started working on it. React is not made to be loaded twice. Even if you load the same version of react but one is bundled into let's say MaterialUI or another library then you will get a Hook Error.
Bundling works fine with other libraries because they don't contain the react "version checking" code.
Bundling everything into one file is pretty easy and I don't get the hook error on the SSR but it's the client side that is the problem. I can't bundle the client side into one file because that will not work with Streaming Server Side Rendering.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I would like to be able to distribute an entire web application as a compiled ahead-of-time executable that has all bundled dependencies, including the web app itself so that it can be used as a dependency free tool.
Once compiled, this single file should not need to download anything upon invocation. Specifically it should contain:
Things it should not need to do upon invocation:
esm.sh
deno.land
Deno has support much of this with the
deno compile
command which downloads and compiles the tree of dependencies starting at its entry point, but where to put the web application and static assets is another matter. Upon cursory inspection, I found these libraries out there for bundling assets with an Deno executable.In both cases, it appears that the assets themselves are encoded as binary data within typescript files. Reflex would just need to support some sort of adapter to load its cache and other assets from some type of store.
The text was updated successfully, but these errors were encountered: