{"id":19057,"library":"babel-plugin-fast-async","title":"babel-plugin-fast-async","description":"A Babel v6 plugin that transforms ES7 async/await syntax using fast synchronous transformation instead of generators/regenerator, achieving 3-4x performance improvements in browsers and Node, and up to 10x on mobile. Currently at v6.2.1, it uses the nodent library for compilation and supports options like Promise-based output, generator fallback, and runtime module imports. Requires nodent runtime unless using 'spec' mode with noRuntime. Released under MIT.","status":"active","version":"6.1.2","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 babel-plugin-fast-async","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-fast-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-fast-async","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core transformation engine for async/await to Promise or generator code.","package":"nodent","optional":false}],"imports":[{"note":"This is a Babel plugin, not a runtime import. Use in Babel configuration (JSON, JS, etc.)","wrong":"import fastAsync from 'fast-async'","symbol":"plugin","correct":"// .babelrc\n{\n  \"plugins\": [\"fast-async\"]\n}"},{"note":"fast-async is not designed for direct JavaScript require/import. Only use in Babel configuration.","wrong":"const fastAsync = require('fast-async')","symbol":"default","correct":"// No JavaScript import required; plugin applied via Babel config"},{"note":"When used programmatically, require the module as a function. Named export does not exist.","wrong":"import { fastAsync } from 'fast-async'","symbol":"PluginFactory","correct":"// Programmatic Babel usage:\nconst fastAsync = require('fast-async');\nbabel.transform(code, { plugins: [fastAsync] });"}],"quickstart":{"code":"{\n  \"plugins\": [\"fast-async\"]\n}","lang":"javascript","description":"Minimal .babelrc to enable fast-async plugin for async/await transformation."},"warnings":[{"fix":"Upgrade to Babel v7 and use @babel/plugin-transform-async-to-generator or similar.","message":"Babel v6 only; does not support Babel v7+.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Set 'runtimePattern' option to a regex matching one file, or use 'useRuntimeModule' for import.","message":"Runtime must be included manually for multi-file projects. Set runtimePattern for single include.","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Set 'dontMapStackTraces: false' in env options if you need mapped stack traces.","message":"Stack trace mapping disabled by default (dontMapStackTraces: true) as of v6.1.x.","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":"Run 'npm install nodent --save' alongside fast-async.","cause":"nodent is a peer dependency but not installed.","error":"Module not found: Can't resolve 'nodent'"},{"fix":"Use @babel/plugin-transform-async-to-generator instead of fast-async.","cause":"Babel v7+ does not support fast-async; use built-in plugins.","error":"SyntaxError: Unexpected token function"},{"fix":"Ensure consistent module system; set Babel sourceType appropriately.","cause":"Mixing ESM and CJS in compiled code; runtime conflict.","error":"TypeError: Cannot assign to read only property 'exports' of object '#<Object>'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}