-
-
Notifications
You must be signed in to change notification settings - Fork 691
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
feat: use cdn url for static assets (#2281) #2283
Conversation
me when i forgor to run cargo fmt |
Thanks, this looks great! @zoomiti I recommended a small change in the comment above. The CI issues here are unrelated and I need to fix things up on main. @CodingFlow could you let us know if this solves it for your use case? The approach here would be something like CDN_PKG_PATH=https://my-cool-cdn.com/my-leptos-app/pkg cargo leptos build i.e., including the |
Wow it looks like CI is so big the container ran out of diskspace, at least for |
Yes, that looks it should do it for me. 👍 |
Thanks very much! |
Okay. Small regression. What happens when my leptos app is not hosted at /? Let's say it's hosted at /ui? The current code assumes / as the root regardless of what's given in the cargo.toml. Isn't this something we should fix? |
The current code doesn't change any routing. All it does is make it so that static assets can be hosted on a CDN instead of on disk. |
@rakshith-ravi I don't think this changes anything — before the PR, the integration assumed the pkg directory is relative to I might be wrong, in which case if you open an issue with a reproduction of problem I'll look at it. |
Ahh, got it. Then we shouldn't have an |
Closes #2281