web-infra-dev / web-infra-dev/rslib

[Feature]: Remove Rspack runtime from CommonJS output files

Open
#1,060 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Rspack
Dominant language
TypeScript
Stars
1k
Forks
67
Avg merge
6h 9m
Merged PRs (30d)
57

Description

What problem does this feature solve?

Currently, each file in the CommonJS format output contains Rspack's runtime code. Is it possible to remove the Rspack runtime and only use require() to import other modules

What does the proposed API look like?

Generate clean CommonJS files that only use standard require() statements to import dependencies, without embedding Rspack runtime in each file.

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 by tracing the CommonJS output path and where Rspack runtime code is added to each generated file. Determine whether dependencies can instead be represented only with standard require() statements. Done means generated CommonJS files contain no embedded Rspack runtime and still import their dependencies correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.