V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
rookie2luochao
V2EX  ›  程序员

写了一个在开发阶段将小程序静态资源自动上传至 CDN 的插件,支持 oss 和普通 http 文件上传接口、默认支持压缩

  •  
  •   rookie2luochao ·
    rookie-luochao · Aug 16, 2024 · 1287 views
    This topic created in 622 days ago, the information mentioned may be changed or developed.
    • 小程序对打包体积有要求,需要抽离静态资源
    • 在构建阶段使用 bundle 传 CDN ,每构建一次都要上传一次 CDN ,开销大
    • 在开发阶段只用上传一次 CDN 便不会再上传 CDN ,默认支持缓存
    • 市面上没有支持普通 http 文件上传接口进行上传的插件
    • 默认支持静态资源压缩,省去手动跑压缩网站进行压缩的繁琐
    • 正在开发 build 阶段进行上传的插件供有需要的选择

    欢迎试用,提 bug, 功能建议,最好能小星星支持一波, 不胜感激

    项目仓库地址:https://github.com/rookie-luochao/upload-assets-to-cdn

    另外有一个对小程序友好的、对 apifox 友好地自动生成前端代码的工具,正在开发支持 react-query hook 功能, 地址:https://github.com/openapi-ui/openapi-ts-request

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1202 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 17:35 · PVG 01:35 · LAX 10:35 · JFK 13:35
    ♥ Do have faith in what you're doing.