You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Timer@timneutkens I see PR was merged (and closes this issue). Not to open another thread but test/integration/production/public/regexp-test.js seems to have ... the hubspot script 🤔 . The Hubspot script had only issues with Promise but I didn't see any issue with RegExp that needs polyfiling.
A quickly wrote a case where it failed before PR (I mentioned es.regexp.sticky):
Then automate contextual polyfilling similar to preset-env, but with the knowledge of what APIs can already be assumed available based on the nomodule polyfill / modern browser baseline.
It's what I was suggesting. preset-env actually does use core-js-compat and a custom filter method to include/exclude polyfills based on browsersList query (in targets prop). It's more or less just:
const{ targets }=require('core-js-compat')({targets: 'IE 11',// <<< browser baseline. Browserslist queryfilter: /^(es|web)\./,// <<< filter only es and web polyfills})Object.keys(targets).filter(moduleName=> ...)// exclude deprecated, not needed such as es.string.fontcolor
Then you end up with a more or less nomodule-polyfill (excluding whatwg-fetch)
We want to minimize the number of core-js polyfills included to support mainly IE11, Edge, and Safari. It'd be great if we could just do:
// next.config.jsmodule.exports={browsers: '> 0.25%, not dead'}
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@Timer @timneutkens I see PR was merged (and closes this issue). Not to open another thread but test/integration/production/public/regexp-test.js seems to have ... the hubspot script 🤔 . The Hubspot script had only issues with
Promise
but I didn't see any issue with RegExp that needs polyfiling.A quickly wrote a case where it failed before PR (I mentioned
es.regexp.sticky
):In IE11:
@developit
It's what I was suggesting.
preset-env
actually does usecore-js-compat
and a custom filter method to include/exclude polyfills based onbrowsersList
query (intargets
prop). It's more or less just:Then you end up with a more or less
nomodule-polyfill
(excludingwhatwg-fetch
)We want to minimize the number of
core-js
polyfills included to support mainly IE11, Edge, and Safari. It'd be great if we could just do:And have
core-js-compat
generate it for us.Originally posted by @eddyw in #10966 (comment)
The text was updated successfully, but these errors were encountered: