Function 'finally' on prototype shouldn't polyfill 'promise'
Open
- Dominant language
- TypeScript
- Stars
- 357
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
When i define a 'finally' function on other function's prototype, why dist code includes "core-js/modules/es.promise.finally.js",
"core-js/modules/es.promise.js".
ex:

Contributor guide
Research direction
Reproduce the example and inspect the generated dist output, especially the injected core-js/modules/es.promise.finally.js and es.promise.js modules. Trace why defining a finally function on another function's prototype is detected as Promise usage. Done means the example no longer adds Promise polyfills unless the source actually requires them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100