Skip to content

ts-gleam don't support aliases #12

Description

@gungun974

I was exploring how I could place files inside my vite project to better separate the typescript side from the gleam side and I wanted to do a structure where typescript is in /resources and gleam in /src.

Having relative imports is something I don't really appreciate since this mean if I move this file somewhere else the import would break

import { main } from "../src/client.gleam";

main();

So I decided to declare an alias # that point to the src directory instead

import { main } from "#/client.gleam";

main();

This work for vite build with for the typescript LSP plugin, it can't resolve the alias and do the type definition linking.

For now I will keep my ugly relative import but I think it would be great to proper support aliases in ts-gleam ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions