Skip to content

Plugin API: Add AST support #782

@GabrielRatener

Description

@GabrielRatener

Currently, when implementing the load function for a plugin, Rollup expects either a raw code string, or a code and map pair to be returned. Being able to return a JS AST would be more direct, as generating JS strings and then recompiling them is highly inefficient and unnecessary for many plugins. Also, the ESTree spec allows for location information to be stored in the AST, which would eliminate the need to resolve a chain of source mappings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions