Skip to content

[GR-54926] Import resolution hook #9177

Open
@sgammon

Description

@sgammon

Describe the issue
I would like a way to override the result of a module import in Truffle languages that support it, like JavaScript or Python. It is already possible to provide a custom filesystem and "override" Node modules, for example, but there is no generalized way to implement synthesized modules across languages.

Code snippet or code repository that reproduces the issue

  1. I have a ProxyObject
  2. I want to make it available "as a module" in a Truffle language, so the user can
import { someKey } from "some-import-intercepted-for-the-proxy-object";

Related context: ESM imports in JavaScript already return an object.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions