-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
serve static with CDN #736
Comments
Hi! Thanks for the feedback. But I'm not sure what you're looking for here 👀 Assets you mean you would like to do |
@kiaking thanks for your reply, as you can see, vitepress generate dist folder with assets (js/css) in it, and the html refer these js/css with relative path: and I want to serve these static file with cdn server like these:
if i change So, i think we can add cdn prefix for generated assets to speed up file loading |
Ah OK. So basically you want everything but html files to served from different domain. It might be easy to do this for imported assets like images but might be more complicated on generated js files since we need to modify manifest json as well...? How do you deploy the site? Do you push |
Yes, you got it. In my case, my cdn provider will pull the resource from origin server if assets missing, So, I don't need to push these files as long as the file with hash in it's name. |
Gotcha. Thanks for the info! I think this is not that easy issue to solve, but if anyone wants to tackle it. PR welcome 👍 |
Is your feature request related to a problem? Please describe.
It's a feature request for better performance
Describe the solution you'd like
I would like to serve the static assets with CDN domains, maybe add some settings like cdnURL ?
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: