esgleam
esbuild for Gleam that works on Erlang & JavaScript.
Quick start
Create a Gleam project as you would normally.
Install
esbuild(note: you will have to rerun this if your build directory gets wiped. i.e. aftergleam clean)$ gleam run -m esgleam/installCreate
/src/build.gleamwith the followingimport esgleam pub fn main() { esgleam.new("./dist/static") |> esgleam.entry("main.gleam") |> esgleam.target("esnext") |> esgleam.target("firefox110") |> esgleam.bundle }Build for JavaScript
$ gleam build --target=javascriptRun your build script (in any target)
$ gleam run -m build
Installation
If available on Hex this package can be added to your Gleam project:
gleam add esgleamand its documentation can be found at https://hexdocs.pm/esgleam.
Roadmap
-
Create file watcher for
*.gleamwhich runs on both Erlang and JavaScript -
Fix bug with STDOUT/STDERR not being shown when running
esbuildin the erlang target - Write tests for config options
- Add more config options if needed
- Pseudo-SourceMaps until #1341 merges
- Consider creating a way to use plugins
- Hot Module Reloading?????