okampfer

有前端大佬用 rollup 来 bundle app code 吗?

  •  
  •   okampfer ·
    athrunsun · May 4, 2020 · 2374 views
    This topic created in 2232 days ago, the information mentioned may be changed or developed.

    我查到的 webpack vs rollup 资料说,后者更适合 bundle library code,但诸如这篇文章里作者也在使用 rollup 来 bundle app code 。

    有前端大佬用 rollup 来 bundle app code 吗?在配置体验上跟 webpack 相比有何异同呢?

    还望各位前端大佬不吝赐教,谢谢!

    4 replies    2020-11-05 15:55:05 +08:00
    SilentDepth
        1
    SilentDepth  
       May 5, 2020
    Rollup 是一个 Bundler,Webpack 是一个内置 Bundler 的资源构建引擎……论开发体验,Webpack HMR 已经足够秒杀 Rollup 了吧
    aaronlam
        2
    aaronlam  
       Oct 24, 2020
    不知道楼主最后是用什么来打包这样的 bundle ?之前我在进行代码抽离的时候也遇到这种问题。。
    okampfer
        3
    okampfer  
    OP
       Nov 5, 2020
    @aaronlam 我自己总结了一些 boilerplate,https://github.com/athrunsun/boilerplates/tree/master/current

    其中有两个名字里带有 rollup 的,都是用 rollup 来打包 app code,而且是多个 bundle —— 一个给现代浏览器用,一个给 IE 用(还有点问题)。

    不知能不能回答你的问题。
    aaronlam
        4
    aaronlam  
       Nov 5, 2020
    @okampfer 感谢回复!这就去学习学习。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3637 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 04:46 · PVG 12:46 · LAX 21:46 · JFK 00:46
    ♥ Do have faith in what you're doing.