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

Rewrite relative gleam imports in ffi code to resolve correctly. #57

Open
1 of 2 tasks
hayleigh-dot-dev opened this issue Jul 19, 2024 · 0 comments
Open
1 of 2 tasks

Comments

@hayleigh-dot-dev
Copy link
Contributor

hayleigh-dot-dev commented Jul 19, 2024

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:

  • 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 Copy nested ffi files into build/ #55)
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