elm-designer icon indicating copy to clipboard operation
elm-designer copied to clipboard

Make Parcel 2 to work or switch to a different bundler

Open passiomatic opened this issue 3 years ago • 3 comments

Elm Designer still uses Parcel 1 for development and build phases.

Parcel 2

As today I have tried unsuccessfully to switch to Parcel 2 (see the parcel2 branch). While running in dev mode everything seems smooth, but when running the "build" command Parcel hangs indefinitely.

We identified the issues being in the terser module which interacts weirdly with the Parcel's Elm plugin, disabling it (manually) fix things.

So we can wait a bit and hope that Em and Terser work better together or we'll be forced to switch to a different bundler.

Other options

Vite seems very popular these days and it has an Elm plugin (https://github.com/hmsk/vite-plugin-elm) , but I personally never used it, so if you have experience with it let me now.

What do we need?

  • Elm transformer
  • Sass compiler (we have Bootstrap sass files to convert into CSS)
  • Minimal support for static assets (PNG, JPEG and SVG)

passiomatic avatar Jun 16 '22 09:06 passiomatic

Vites great in my experience with it for an elm-spa app so not huge but not trivial either... otherwise webpack is good n' faithful if but a bit crusty around the edges 🤷‍♂️

erlandsona avatar Jun 16 '22 13:06 erlandsona

@ChristophP narrowed it down. This is a Terser issue https://github.com/terser/terser/issues/1212

passiomatic avatar Jun 17 '22 13:06 passiomatic

The issue is fixed. Now we just need to wait for the next release.

ChristophP avatar Jun 20 '22 07:06 ChristophP