The vite-gleam plugin for site lets one write javascript code that can import relative gleam files directly, for example import { main } from './app.gleam'.
We should add similar support so that users could do both of the following:
[x] Resolve relative gleam imports such as ./app.gleam to the compiled ./app.mjs path.
[ ] Resolve bare gleam imports such as lustre/element.gleam to the relative path to the compiled gleam package ../lustre/lustre/element.mjs (assuming the js file importing this module was in the root of the app's source, adjust accordingly for nested ffi files supported by #55)
The vite-gleam plugin for site lets one write javascript code that can import relative gleam files directly, for example
import { main } from './app.gleam'
.We should add similar support so that users could do both of the following:
./app.gleam
to the compiled./app.mjs
path.lustre/element.gleam
to the relative path to the compiled gleam package../lustre/lustre/element.mjs
(assuming the js file importing this module was in the root of the app's source, adjust accordingly for nested ffi files supported by #55)