Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
480 views
in Technique[技术] by (71.8m points)

为什么【用 “mini-css-extract-plugin” 提取css到单独的文件】后,页面显示更慢了?

》不提取css,页面的头部会有很多style,含有大量element的样式代码。但访问响应并显示速度还挺快。边下载,边显示。

》用mini-css-extract-plugin提取后,
页面头部没有style标签了,被加了<link rel="preload" href="./app.0df82be2f72050d9a543.css" as="style"> 等。
访问,浏览器首先是全白,等个2秒后才一起显示。

备注:我的页面是vue ssr渲染的。html尾部插了一个很大的状态数据,导致html尺寸很大。

webpack 配置
image.png
image.png
image.png
image.png

发现请求里没有加载打包后的css,为什么?
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...