WICG / WICG/webpackage

Bundles of JS modules should be able to express their dependency graph cheaply

Open
#411 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bundled-exchanges
Dominant language
Go
Stars
1.3k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

If you have 2 modules:

A.mjs:

import "B"
// Lots of code.

B.mjs:

// Lots more code.

You have to download A and parse it to figure out that it depends on B. Then you have to download B and execute it before you can use nearly any of the bytes you downloaded for A.

Bundles should help speed this up, either by directly expressing the import dependency graph in a way that the JS interpreter will trust, or by letting the bytes of the resources interleave so they can parse and execute in the order they arrive.

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 A.mjs and B.mjs examples in the issue, then examine the web package format and how JavaScript interpreters discover module dependencies. The issue presents two broad approaches rather than a specific change, so completion would require defining and validating a concrete dependency-graph or interleaving design.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.