babel / babel/babel-polyfills

polyfill-regenerator pollutes global scope even if set to "usage-pure"

Open
#59 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
357
Forks
62
PR merge metrics
No merged PRs in 30d

Description

I might be misunderstanding here, but I thought using `polyfill-regenerator` was not supposed to pollute global scope if set to `usage-pure`. You can see a repro [here](https://github.com/utrolig/webpack-polyfills).

When I build the app and open the `index.html` file, I can still see the `regeneratorRuntime` global variable.

Contributor guide

Open the contributing guide

Research direction

Start with the linked webpack-polyfills reproduction: build the app and open index.html, then inspect where regeneratorRuntime appears despite the usage-pure setting. Compare that behavior with polyfill-regenerator's usage-pure configuration; done means the build no longer exposes regeneratorRuntime globally under that setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.