the front end is packaged through webpack using Vue cli,. After using nginx, it is found that the TTFB of manifest.js needs 6s, and the loading speed is too slow for the first time
nginx is configured as follows
server {
listen 80;
server_name 127.0.0.1;
location / {
root /var/www/project/dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ^~/api/ { proxy_pass http://127.0.0.1:5438/api/; }
}
dist directory is as follows:
dist/
[1.1K] favicon.ico
[ 901] index.html
[441K] static
[229K] css
[189K] app.0134d2dda560ad06a1485c5f69858798.css
[ 36K] app.0134d2dda560ad06a1485c5f69858798.css.gz
[ 15K] fonts
[ 11K] element-icons.6f0a763.ttf
[193K] js
[ 53K] app.ce2c95e6433bd8164fc4.js
[ 18K] app.ce2c95e6433bd8164fc4.js.gz
[ 799] manifest.2ae2e69a05c33dfc65f8.js
[ 88K] vendor.78ce98b3a34633bdf003.js
[ 29K] vendor.78ce98b3a34633bdf003.js.gz
however, using chrome to view, only loading static files, the TTFB is always 6s when requesting manifest.js, which causes the download time of vendor.js and app.js to also reach 6s, so the loading of the first screen is very slow. What is the problem?