A Babel plugin that transforms ES7 async/await to Promise-based code without generators, offering 3-4x performance improvement in browsers vs Babel's default regenerator approach. Current stable version is 6.3.8 (for Babel 6) and version 7 for Babel 7 (beta). Uses the nodent library under the hood. Key differentiators: avoids generators and regenerator, supports 'spec' mode for spec-compliance, and allows runtime pattern customization. Has undergone several fixes for edge cases like destructuring and export hoisting.
npm install fast-asyncVerified import paths — ran on the pinned version, not inferred.
Shows basic babel plugin configuration and the transformation from async/await to Promises.
Use 'module:fast-async' in plugins array for Babel 7.
Remove these options from configuration; they are no longer supported.
Either include runtime via 'runtimePattern' or set 'compiler.promises: false' if your environment supports Promises.
Only use standard async/await syntax; those extensions are only available with nodent directly.
Ensure 'dontMapStackTraces' defaults to true; avoid enabling both mappings simultaneously.
Ensure babel-preset-es2015 (or equivalent) is installed and listed in .babelrc 'presets'.
Verify Babel version and install correct fast-async version (v6 for Babel 6, v7 for Babel 7).
Ensure all await expressions are inside async functions. Use standard ES2017 syntax.