Comments (2)
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.
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)
- aasync-to-gen breks babel-register HOT 1
- async-to-gen conflicts with babel HOT 11
- Use with Jest HOT 2
- Invalid async lambda generation HOT 2
- TypeError: Cannot read property 'type' of null HOT 8
- In node.js sourceMaps off? HOT 5
- iife and crockford-iife functions break HOT 5
- memory leak HOT 3
- require hook is only usable in development? HOT 4
- `referencesArgs: true` causes SyntaxError in strict mode HOT 3
- Add license file to repo HOT 2
- Unexpected yield from async function with for await statement HOT 8
- Is there a way to remove the require hook? HOT 8
- Better output when parser fails HOT 3
- Comparison with fast-async? HOT 2
- Indlude a specific dir inside node_modules HOT 4
- Arrow function with parenthesised object literal causes syntax error HOT 2
- Windows Encoding is UTF 16 LE by default HOT 1
- [async-node]: support for require flag? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-to-gen.