I'm trying to use gleam for my personal website and I had an idea to write the backend in erlang gleam and frontend using gleam with solid.js (with ssr probably manually implemented in erlang gleam as well).
The problem is I want to put both components in the same project which means there's going to be javascript specific gleam code (for purely client side interactions like event handlers), erlang+javascript gleam code (mainly for generating html), and erlang specific gleam code (for beam stuff).
I was wondering what's the best way to lay out the project for that purpose? The main issue is that it seems that gleam build goes through every file in the project for compilation which means that when the target is set to javascript then the erlang code would error out and vice versa. So is there a way to specify a set of entrypoints for gleam build?
Also let me know if there's any suggestions for this project since I'm really new to gleam. Overall the language feels really nice and I'm excited for the possibilities!