-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Allow whitelist and blacklist options for runtime transformer definitions (T6904) #3934
Copy link
Copy link
Closed
Labels
Priority: Highhelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Issue originally made by @guybedford
Description
It would be nice to add a custom options whitelist and blacklist to the runtime transformer something like:
plugins: [['transform-runtime', { exclude: ['Promise', 'Array.*', 'Object.defineProperty'] }]]
Or an opt-in-only whitelist:
plugins: [['transform-runtime', { include: ['Object.assign', 'String.*', 'Math.*'] }]]
The specific use case that came up for me now was excluding the Promise polyfill in particular since SystemJS by default has a polyfill present already.
The nice thing is this would enable the creation of runtime transformer presets which can be based on various engine support baselines.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority: Highhelp wantedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue