2021-04-09 - alpha12

Improved performance, smaller wire payloads, inbuilt CORS support, and more!

Lamdera Alpha12 is now available!

https://dashboard.lamdera.app/docs/download

Note: You will need to run lamdera reset to clear all Elm & Lamdera related caches, this is a major release!

Here's what's new:

  • Wire3: faster, smaller
  • Faster and more stable local development
  • Inbuilt CORS poxy support
  • Support for Elm's File type in Frontend messages
  • elm-format all the things!
  • Bugfixes and improvements

Wire3: faster, smaller

The Lamdera Wire feature is now completely Bytes based, meaning it's faster (no conversions to/from base64 + json).

It's also smaller. For example, this custom type value:

Lamdera.sendToBackend RenewSession

Has evolved in wire like so:

  • v1: FkxvZ1BhZ2VWaWV3CkFkbWlu 24B value + 21B wrapper (not shown) = 45 Bytes
  • v2: AgA= 4B value + 21B wrapper (not shown) = 25 Bytes
  • v3: Ȃ: 1B value + 2B wrapper = 3 Bytes!

Lamdera's wire encoding is now likely as small as it theoretically can be (short of bitwise encoding, which would tradeoff decoder performance).

A bug was also fixed that caused decode failures when record types had their field ordering changed but without any type changes.

Faster and more stable local development

Local development on Lamdera was already fast, and now it should feel noticeably even faster!

lamdera live now intelligently recompiles your project in memory and serves from cache to all windows.

Inbuilt CORS proxy support

lamdera live will now try to detect when you are making a Backend HTTP request, and automatically proxy it through the new inbuilt CORS proxy. This makes the out-of-the-box lamdera live experience even closer to production behavior.

There are still some situations where this detection might fail (in particular Task.andThen chains), so don't throw away your CORS browser plugin just yet!

See the CORS note for more details.

Support for Elm's File type in Frontend messages

Lamdera enforces Wire-compatible types in all core types, which prevents usage of types which cannot be both serialized and deserialized.

One such type was File, which is backed by the File Web API, which disallows construction for security reasons (it would be bad if one could construct a File refrence to any file on a user's actual system!).

File is now supported in wire, but in FrontendMsg types only. This means the key elm/file file function;

file : List String -> (File -> msg) -> Cmd msg

can now be used. This allows you to then use toBytes to convert to Bytes if you wish to use those file contents in a sendToBackend.

Evergreen migrations will also automatically work if a user happens to be selecting a file just as a frontend migration is in progress.

elm-format all the things!

Lamdera will now try to detect if you've got elm-format installed, and if you do, apply it to all Lamdera generated code.

If you haven't checked out elm-format yet, you really should!

🐛 Bugfixes and improvements

  • Sometimes lamdera check would fail, and spitefully mess up some of your imports on the way out. No more!
  • Long-running frontends would sometimes disconnect from the backend, and forget to connect again. They're now less forgetful.
  • If you had multiple windows open with lamdera live, sometimes there would be locking errors on hot reload as they all tried to recompile together. They now all use the new caching system.
  • A common beginner issue was forgetting to commit src/Evergreen and not running lamdera check. This will now get caught in the deploy stage with a less confusing error.
  • There were some nasty error messages when using lamdera in a non-git folder, these are now kinder.
  • The lamdera --version output is now adjusted to play nicely with elm-review.
  • Regression: App config usages reporting, wasn't reporting anything, and now it does again.
  • Regression: Unsupported wire types are now reported immediately upon usage again, rather than just at lamdera check time.
  • A whole slew of under-the-hood improvements!

As always, feedback and questions are welcome in our friendly Discord community!

Back to All Releases
Login
© 2025 Lamdera