elm-designer
elm-designer copied to clipboard
Make Parcel 2 to work or switch to a different bundler
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)
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 🤷♂️
@ChristophP narrowed it down. This is a Terser issue https://github.com/terser/terser/issues/1212
The issue is fixed. Now we just need to wait for the next release.