What asset building tools are people using?

Seems like there’s an ever-increasing supply of these. Webpack, Parcel, Rollup, Snowpack, Vite, esbuild, etc etc. I’m curious which ones people are using for their projects (and why!) and also what example configuration file resources there are for setting up Elm projects with different ones.

I’ve mostly been using Parcel for my Elm projects for the last few years because of how generally easy it is to configure but I’m intrigued by some of the newer faster ones.

Still Webpack, works well and by this point I know how to configure it well. For typescript we use the SWC loader for Webpack https://swc.rs/.

I have used Parcel before, but if I remember correctly I couldn’t have multiple entry points (probably not the case anymore?).

I have looked briefly at esbuild, looks very interesting, but I wonder if it will make any speed difference for Elm, as most of the work is done by the Elm compiler.

1 Like

You can do multiple entry points with it (I’ve got a project where it’s building a few Elm apps and a few small js endpoints as well), but it’s been feeling a bit slow to me lately, which is partly why I’m curious about other things.

Esbuild can make a difference, depending on how much JS you have, including the compiled JS that you want to minify. I do know that NRI is using rebuild as one example Post "Elm at NoRedInk"

Development:

  • Elm code: elm-live
  • TypeScript code: esbuilt watch mode (executing touch on Main.elm to force elm-live to reload). Esbuild is really super fast.

Production build:

  • Elm code: elm-optimize-level-2 + terser
  • TypeScript code: rollup (with terser plugin)

Rollup (with terser) is much slower than esbuild but it produces smaller builds.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.