Faster build times 🚀

NodeBB Development
  • GNU/Linux

    @baris looked into speeding up build times without sacrificing payload size in webpack, and found esbuild, which has been very helpful in reducing the build times, especially on lower-end machines.

    We're seeing a 100% (or more) speedup on build times, down from ~140 seconds to ~30 seconds (these of course are wildly approximate numbers, YMMV).

    Traditionally, the thought in a lot of programming contexts is "it doesn't matter how long it takes to build, it matters the payload size", but thanks to the work of the esbuild team, and Baris for implementing, now we can have our cake and eat it too!

  • GNU/Linux

    For reference, I just rebuilt and restarted this forum:

    info: [build] Asset compilation successful. Completed in 32.083sec.


  • NodeBB

    For reference on v3.x alpha with this change my local build goes from 11.2 seconds down to 5.1 seconds.

    info: [build] Asset compilation successful. Completed in 11.296sec.

    with esbuild

    info: [build] Asset compilation successful. Completed in 5.123sec.
  • #4

    This is epic, great work guys. My build times went from close to a min I think... to around 16s.
    This makes quickly iterating so much more enjoyable.

  • GNU/Linux

    It gets even faster when you pass in development under the NODE_ENV flag!

    ... but of course you don't want to enable that flag in production.

Suggested Topics

| | | |