Pass Babel AST directly
See original GitHub issueI’m submitting a feature request
Webpack Version:
v4.0.0 (@next)
Babel Core Version:
v7.0.0 (@next)
Babel Loader Version:
v8.0.0
Current behavior:
Pass result.code
{String}
Desired behavior:
Pass result.ast
as metadata cb(null, code, map, { webpackAST: ast /* result.ast */ })
{Object}
⚠️ Needs to be compatible to the Acorn AST (ESTree) (webpack #5925)
- What is the motivation / use case for changing the behavior?
Avoid unnecessary parsing, if possible
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:17 (16 by maintainers)
Top Results From Across the Web
Options - Babel.js
Options can be passed to Babel in a variety of ways. When passed directly to Babel, you can just pass the options object....
Read more >Understanding ASTs by Building Your Own Babel Plugin
Here's the visual representation for the two ASTs. Member AST. We can almost use the properties of the MemberExpression directly, however the ...
Read more >Manipulating AST with JavaScript - Tan Li Hau
Armed with the knowledge and experience of playing the JavaScript AST with Babel, let's take a look at how we can generalize this...
Read more >Manipulating AST with JavaScript
Like how we use Babel to do parsing and generating JavaScript, ... you can immediately see how the AST looks like on the...
Read more >How to Add Extra Functionality to Your Modules With Babel
If you go back to AST Explorer, you will notice that the topmost type of your file is called a Program , so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://twitter.com/loganfsmyth/status/929564354571157504
It’s been 5 years since this issue was created…so has any progress?