Skip to content

Export babel tooling in @babel/standalone and @babel/core #11599

@ajihyf

Description

@ajihyf

Feature Request

  • I would like to work on this feature!

Is your feature request related to a problem? Please describe.
I am implementing a tool to transform an expression using parser.parseExpression, traverse, types.X and generate(exp). This tool should be directly used on the web however @babel/standalone doesn't export these toolings.

Describe the solution you'd like
Directly export babel tooling in @babel/standalone(and @babel/core, since @babel/standalone just imports from it).

Describe alternatives you've considered
I tried to use babel.transform from @babel/standalone. But an expression will be treated as a statement by babel or trigger a parsing error(like { a, b: 3, ...obj }).

Metadata

Metadata

Assignees

No one assigned

    Labels

    i: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions