Skip to content

Support for import(blobUrls) #61013

@strogonoff

Description

@strogonoff

What is the problem this feature will solve?

The same thing that vm.SourceTextModule(yourCodeString, { identifier, context }) does, but in a way compatible with other JS runtimes.

Useful for implementing extensions, for example.

What is the feature you are proposing to solve the problem?

Compatibilty with other JS runtimes when it comes to import() and blob URLs.

Example code:

code = 'console.log("hi")'
blob = new Blob([code], { type: 'text/javascript' })
url = URL.createObjectURL(blob)
import(url)

References:

What alternatives have you considered?

vm.SourceTextModule(yourCodeString, { identifier, context })

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions