nodejs / nodejs/node

Support for `import(blobUrls)`

Open
#61,013 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

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 })

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed import(url) example and compare it with vm.SourceTextModule(yourCodeString, { identifier, context }). Review the referenced import(), URL.createObjectURL(), and blob URL behavior to define the compatibility target. Done means the example works with a Blob-created JavaScript URL in Node.js and matches the relevant runtime behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.