New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow whitelist and blacklist options for runtime transformer definitions (T6904) #3934
Comments
Actually the So perhaps just to document the above option with a note in the readme? Otherwise happy to close this. |
There is another case that needs an opt-out here and that is the Currently with the The babelHelpers global doesn't seem to rely on the Symbol polyfill so perhaps the |
There's some discussion around a related issue in [[ https://github.com/webpack/webpack/issues/2873#issuecomment-241791521 | webpack#2873 ]]. Basically, I'm finding it difficult to understand when it's appropriate/recommended to use There's no documentation that describes what Weirder still, as @guybedford mentioned, the helpers patched in by Many of the core-js implementations (particularly of ES5 features) are also unnecessary in modern environments -- things like I've also noticed that Rollup's developers seem to have encountered many of the same frustrations, as [[ https://github.com/rollup/rollup-plugin-babel/blob/master/src/index.js#L36 | Formulating this as a story: As a browser-based developer, I would like to be able to compile an application that:
In the above requirements, it is assumed that:
Satisfying these criteria requires implicitly requires us to resolve T6834 (or to provide convenient hooks for tools like Rollup and Webpack to provide their own implementations of module-centric helpers) |
Moved some duplicate/similar issues into this. We should definetely do it. At the minimum we can expose a |
Idea: instead of specifying what syntaxes to be transformed, what about specifying what is the targeting js version? So it's like the For example, say I am writing es2016 code (no |
This is now supported in the new {
"plugins": [
["polyfill-corejs3", {
"method": "usage-pure",
"exclude": ["es.promise"]
}]
]
} Or, if you need more advanced filters, you can use the |
Description
It would be nice to add a custom options whitelist and blacklist to the runtime transformer something like:
Or an opt-in-only whitelist:
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.
The text was updated successfully, but these errors were encountered: