{"id":20025,"library":"fast-async","title":"fast-async","description":"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.","status":"active","version":"6.3.8","language":"javascript","source_language":"en","source_url":"https://github.com/MatAtBread/fast-async","tags":["javascript","babel","plugin","Javascript","ES7","async","await"],"install":[{"cmd":"npm install fast-async","lang":"bash","label":"npm"},{"cmd":"yarn add fast-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add fast-async","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core transformation library; provides async/await compilation logic","package":"nodent","optional":false}],"imports":[{"note":"CommonJS only; no default ES import provided. Use require or dynamic import.","wrong":"import fastAsync from 'fast-async'","symbol":"default","correct":"module.exports = require('fast-async')"}],"quickstart":{"code":"// .babelrc\n{\n  \"plugins\": [\"fast-async\"]\n}\n\n// Input\nasync function fetchData(url) {\n  const response = await fetch(url);\n  return response.json();\n}\n\n// Output (simplified)\nfunction fetchData(url) {\n  return Promise.resolve().then(function() {\n    return fetch(url);\n  }).then(function(response) {\n    return response.json();\n  });\n}","lang":"javascript","description":"Shows basic babel plugin configuration and the transformation from async/await to Promises."},"warnings":[{"fix":"Use 'module:fast-async' in plugins array for Babel 7.","message":"Babel 7 requires 'module:fast-async' plugin prefix instead of 'fast-async'","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Remove these options from configuration; they are no longer supported.","message":"Options 'augmentObject', 'dontMapStackTraces', 'dontInstallRequireHook' removed in v6.3.x","severity":"breaking","affected_versions":">=6.3.0"},{"fix":"Either include runtime via 'runtimePattern' or set 'compiler.promises: false' if your environment supports Promises.","message":"Compiled code typically requires nodent runtime unless 'noRuntime' or 'spec' option is used","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Only use standard async/await syntax; those extensions are only available with nodent directly.","message":"ES7 extensions like 'await' outside async function or 'async return' are not supported because Babel parses the code","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure 'dontMapStackTraces' defaults to true; avoid enabling both mappings simultaneously.","message":"Stack trace mapping can conflict with Babel's own mapping, causing confusion","severity":"gotcha","affected_versions":">=6.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure babel-preset-es2015 (or equivalent) is installed and listed in .babelrc 'presets'.","cause":"Missing Babel presets required by fast-async or configuration error","error":"Error: Couldn't find preset \"es2015\" relative to directory ..."},{"fix":"Verify Babel version and install correct fast-async version (v6 for Babel 6, v7 for Babel 7).","cause":"Plugin loaded incorrectly or Babel version mismatch (e.g., using v6 plugin with Babel 7)","error":"TypeError: Cannot read property 'async' of undefined"},{"fix":"Ensure all await expressions are inside async functions. Use standard ES2017 syntax.","cause":"Babel parser does not support certain async/await syntax edge cases (e.g., await in non-async function)","error":"SyntaxError: Unexpected token (1:14) ... while parsing async function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}