taro H5 打包静态资源时带 hash 值,方便缓存、版本管理

您所在的位置:网站首页 如何制作h5资源 taro H5 打包静态资源时带 hash 值,方便缓存、版本管理

taro H5 打包静态资源时带 hash 值,方便缓存、版本管理

#taro H5 打包静态资源时带 hash 值,方便缓存、版本管理| 来源: 网络整理| 查看: 265

taro H5 打包静态资源时带 hash 值,方便缓存、版本管理 转载

mb5fdb09c3c3319 2020-04-16 12:00:00

文章标签 css h5 缓存 静态资源 版本管理 文章分类 代码人生

1.配置

config/index.js

const config = { ... h5: { // NOTE H5 打包静态资源时带 hash 值,方便缓存、版本管理 publicPath: '/', staticDirectory: 'static', output: { filename: 'js/[name].[hash].js', chunkFilename: 'js/[name].[chunkhash].js' }, imageUrlLoaderOption: { limit: 5000, name: 'static/images/[name].[hash].[ext]' }, miniCssExtractPluginOption: { filename: 'css/[name].[hash].css', chunkFilename: 'css/[name].[chunkhash].css', }, ... }, }

.

打赏 收藏 评论 分享 举报

上一篇:taro 返回屏幕可用高度

下一篇:taro 设置 别名(alias)



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3