webpack之缓存

webpack的缓存经过文件名来。经过使用output.filename进行文件名替换,若是文件名被替换,浏览器会认为它被更新,则缓存失效,向服务器请求资源;不然继续使用缓存,无需再次请求资源。经过缓存下降网络流量,使网站加载速度加快。 只需在webpack.config.js里配置:html const path = require('path'); const CleanWebpackPl
相关文章
相关标签/搜索