lustre-labs / lustre

An Elm-inspired framework for building HTML templates, single page applications, and server-rendered components in Gleam!
https://hexdocs.pm/lustre
MIT License
744 stars 53 forks source link

✨ Serve nested modules that return Lustre applications with `lustre/try`. #29

Closed hayleigh-dot-dev closed 3 months ago

hayleigh-dot-dev commented 6 months ago

The lustre/try preview server at the moment only serves the application from the main function in the module that corresponds to the project's name.

This is a sensible entry but for folks that want to experiment with an MPA setup it might be nice to detect and serve any routes that setup a Lustre application (or return an Element see: #28).

This is probably as much scope creep as we should tolerate for now, because ideally we want to push folks into either use vite or esbuild (through the cli) instead.