Closed
Description
This is the example from the page:
import { parse } from "@babel/parser";
import { generate } from "@babel/generator";
const code = "class Example {}";
const ast = parse(code);
const output = generate(
ast,
{
/* options */
},
code
);
Seriosuly? At the bottom of the page there is one example that includes const { code, map } = generate
but who knows what code or map are?
Metadata
Metadata
Assignees
Labels
No labels
Activity
babel-bot commentedon May 14, 2025
Hey @joeedh! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.