Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esbuild bundling failure when using custom entry #76

Open
patwid opened this issue Oct 20, 2024 · 0 comments
Open

Esbuild bundling failure when using custom entry #76

patwid opened this issue Oct 20, 2024 · 0 comments

Comments

@patwid
Copy link

patwid commented Oct 20, 2024

Trying to start (or build) a custom entry other than the one specified in gleam.toml fails:

❌ Bundling with esbuild

I ran into an unexpected issue while trying to bundle your project with esbuild.
Here's the error message I got:

    ✘ [ERROR] Could not resolve "../dev/javascript/foo/foo.mjs"

    build/.lustre/entry.mjs:1:21:
      1 │ import { main } from "../dev/javascript/foo/foo.mjs";
        ╵                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error

In the example above, there are two modules app (main) and foo (custom). Starting the main module (i.e. the one speicified in gleam.toml by running gleam run -m lustre/dev --entry=app works. Starting the custom module by running gleam run -m lustre/dev --entry=foo fails with the aforementioned error. The bundle is actually available under a different path (../dev/javascript/app/foo.mjs).

Let me know, if I can provide any further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant