evanw / evanw/esbuild

Enabling tree-shaking changes position of legal comment with legal-comments=inline

Open
#3,931 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
40.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

https://esbuild.github.io/try/#dAAwLjI0LjAALS1mb3JtYXQ9ZXNtIC0tbGVnYWwtY29tbWVudHM9aW5saW5lIC0tdHJlZS1zaGFraW5nPXRydWUALy8gQGxpY2Vuc2UKaW1wb3J0IHsgdGVzdCB9IGZyb20gIi9zdGF0aWMvdGVzdC5qcyIKCnRlc3QoKTs

With --tree-shaking=true the legal comment moves after the imports. With --tree-shaking=false the legal-comment stays before the import.

Contributor guide

No contributing guide indexed for this repository

Research direction

Run the linked esbuild playground reproduction with tree shaking enabled and disabled, then compare the legal comment's position relative to the imports. Trace the tree-shaking and legal-comment output paths from that reproducer; done means the comment placement is consistent with the intended behavior in both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.