Skip to content

Suggestion: Import maps #233

Description

@kitsunecafe

it's implied in some of the documentation that godotjs aims to support npm dependencies. would it make more sense to investigate supporting import maps instead? they're supported by all major browsers and deno. node has implemented package maps which are very roughly similar to import maps.

presumably, the user would define some json file which maps import names to paths that resolve to javascript modules. this would hopefully alleviate a little of the headache of runtime variance in module imports. if a developer wants to use NPM, they can just write their paths to resolve modules from node_modules.

obviously this is a non-trivial suggestion. there are still outstanding issues

  • is the project and all its dependencies bundled as one file?
  • commonjs? esm? some secret third thing?

i'd be happy to look eventually creating a PR for it but i wanted to see if there's any interest in this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions