Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transpile override to AstEditor #511

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

TwitchBronBron
Copy link
Member

In some situations, a plugin is unable to replace/remove an element from the AST (perhaps due to using an array from Parser.references). Without being able to replace/remove the elements themselves, overriding the transpile is a nice alternative.

  • adds a overrideTranspileResult method to the AstEditor which will return a sourcemap-enabled block of text to replace what would have been transpiled originally.

@TwitchBronBron TwitchBronBron merged commit a8706a0 into master Feb 10, 2022
@TwitchBronBron TwitchBronBron deleted the AstEditor-overrideTranspile branch February 10, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants