Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi Karolina,

    The issue is pointed at the wp-polyfill.js file, however that is not enqueued by our plugin. From the screenshot it appears, that the Array.prototype.reduce method was polyfilled via the wp-polyfill.js

    As for the article. It is a great feature, however most cache plugins will simply combine and minify the enqueued JS files. As far as I know, there is currently no mechanism in WordPress to enqueue ES2015+ .mjs files simply, without manipulating the script tags. That might be simple to resolve, but if a 3rd party cache picks up the wrong enqueued file – or more likely both, and then combine both into a single file.

    Best,
    Ernest M.

    • This reply was modified 3 years, 5 months ago by wpdreams.
    Thread Starter Karolina Vyskocilova

    (@vyskoczilova)

    @wpdreams Yeah, hmm, I thought it was your plugin who loaded wp-polyfill, sorry for that, I need to dig deeper into dependencies.

    I’ll let you know!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pagespeed – Avoid serving legacy JavaScript to modern browsers’ is closed to new replies.