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

speed up loading JS assets #675

Open
juzhiyuan opened this issue Oct 25, 2021 · 1 comment
Open

speed up loading JS assets #675

juzhiyuan opened this issue Oct 25, 2021 · 1 comment
Labels
Enhancement New feature or request stale

Comments

@juzhiyuan
Copy link
Member

Actual Behaviour

Hi, we're using https://docusaurus.io/ V2 to build our website, when it's built after running yarn build, it will generate many JS assets under the build/assets/js/ directory, e.g https://github.com/apache/apisix-website/tree/asf-site/assets/js

And when we visit our website, it will first load the runtime~main.xxxx.js file, and it will load all necessary other JS assets asynchronously, but with relative URL like the following screenshot:

image

Expected Behaviour

https://apisix.apache.org/assets/js/69365.a39fd14a.js.

This URL is correct but I would suggest that we load them from jsDelivr, too. So users in China could visit faster.

@juzhiyuan
Copy link
Member Author

Here has one PR I submitted yesterday, due to some issues I reverted it, you could refer to #670

see #671 (comment)

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

No branches or pull requests

2 participants