HorusHe

使用 Bundler 工具辅助分析 CF Worker 体积

  •  
  •   HorusHe · Jun 3, 2024 · 1125 views
    This topic created in 710 days ago, the information mentioned may be changed or developed.

    Cloudflare 的 Worker 非常好用,但是 Free Plan 下的容量仅限 1MiB 但是其配套的 wrangler 没有提供包体积分析能力

    这时候可以用前端的各种 bundle 工具来辅助分析(例如 Rspack / Webpack / Rollup ),流程:

    1. 新建 bundler 对应的配置文件
    2. 安装分析插件
    3. 运行打包分析命令

    我用 Rspack 来进行辅助分析。至于为什么用 Rspack ,一个字:「快」!

    Rspack Analyze

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