GithubHelp home page GithubHelp logo

Comments (9)

nicolo-ribaudo avatar nicolo-ribaudo commented on May 18, 2024 2

Thanks for clarifying.

Then the answer is "it's not possible until regenerator-runtime stops polluting the global scope (facebook/regenerator#302). When it stops doing so, this plugin won't need any change but you'll just need to update your regenerator-runtime dependency."

from babel-polyfills.

ljharb avatar ljharb commented on May 18, 2024 2

That commit would only impact CSP, not global scope.

from babel-polyfills.

nicolo-ribaudo avatar nicolo-ribaudo commented on May 18, 2024 1

It's an error on my side, I didn't realize that regenerator always defines the global.

However, this is tracked at facebook/regenerator#302.

from babel-polyfills.

nicolo-ribaudo avatar nicolo-ribaudo commented on May 18, 2024 1

This needs to be fixed in regenerator itself, since currently it doesn't expose an entry point which exports regeneratorRuntime without also defining it as a global.

from babel-polyfills.

stiboost avatar stiboost commented on May 18, 2024

Thanks for the fast response - does this mean that we would have to wait until it is resolved in the issue you linked, or are you able to resolve it?

from babel-polyfills.

utrolig avatar utrolig commented on May 18, 2024

So there is no way to completely polyfill and transpile the code down without requiring the regeneratorRuntime ?

from babel-polyfills.

nicolo-ribaudo avatar nicolo-ribaudo commented on May 18, 2024

without requiring the regeneratorRuntime ?

I'm not 100% sure I understand what you are asking. If you look at your dist/bundle.js file, it never uses the regeneratorRuntime global variable.
It defines it (regeneratorRuntime=r, which is the same as window.regeneratorRuntime=r), but then never relies on it.

from babel-polyfills.

utrolig avatar utrolig commented on May 18, 2024

Sorry I should've been more specific.

What I'm trying to achieve is to transpile my typescript application with async/await down to IE11 compatible code, without polluting the global scope. That includes polyfilling without scope pollution as well. There doesn't seem to be too much information about that on the web in general

from babel-polyfills.

juergba avatar juergba commented on May 18, 2024

A new version v0.13.9 of regenerator-runtime has been released recently, including this commit.
Does it solve this issue?

from babel-polyfills.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.