-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
After packaging, the local search index js file exceeds 500kb. #3873
Comments
You probably have a big site. You can reduce it to some extent by adding Also, I would recommend verifying if your host has brotli compression enabled. With brotli, the network requests will be around ~240 KB for end users and verify if the assets have proper cache headers -- things inside assets directory are fingerprinted, so you can use This chunk is lazy loaded and won't affect initial load for users. You can verify if it's fast enough by deploying and trying out searching. If it's working fine you can probably ignore that warning or adjust warning limit till it goes to 2 MB or something. |
I deleted the CHANGELOG.md file, deleted the cache and dist folders, rebuilt the program, but still prompted
And My host uses nginx as a proxy, the compression method used is gzip, I tried to use brotli compression, but installing this brotli was too complicated, and eventually I gave up using brotli. If vitepress can't fix the oversized |
yeah it just suppresses the warning. |
Can you share the output of this command from PowerShell in your docs folder: Get-ChildItem –Path "*.md" -Recurse | Get-Content | Measure-Object -Character -Line -Word |
Describe the bug
After using the packaging command, the prompt
Some chunks are larger than 500 kB after minification
I checked the generated file and found that the
@localSearchIndexroot.DwawiV-k.js
file was too large, more than 800 kb.Reproduction
Executing the build command will result in chunks exceeding 500kb
Expected behavior
How to keep chunks from exceeding 500kb or solve the source problem. The index file seems to be too large.
I will provide an index file produced by me in the attachment.
System Info
Additional context
@localSearchIndexroot.DwawiV-k.zip
Validations
The text was updated successfully, but these errors were encountered: