Giter VIP home page Giter VIP logo

Comments (2)

Morriz avatar Morriz commented on May 21, 2024

I created a pull request with a fix that would not register async-to-gen when another hook is active, allowing a previous hook (babel etc) to be leading: #14

Maybe not the nicest of fixes, but after spending 2 hours on a solution I settled for that, as it just covers most use cases.

from async-to-gen.

leebyron avatar leebyron commented on May 21, 2024

I've changed the behavior of the register hook in #16 to apply to any compiled module rather than using require.extensions. This abstracts it away from the file extension so that it will just use whatever behavior node already uses. That means implicit support for .jsx and .es6 or .omgwtf if that's what you're into.

#16 also ensures this module's require hook doesn't clobber an existing one like Babel's, however the only way to accomplish that is by going second. Babel's transformer will run first. If you're already using Babel to handle JSX, then you're best off just handling async functions within Babel as well (use babel-preset-es2017) and probably just don't use this library at all. However this also means if you're using async-node by accident or otherwise that things won't break.

from async-to-gen.

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.