question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass Babel AST directly

See original GitHub issue

I’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:open
  • Created 6 years ago
  • Reactions:1
  • Comments:17 (16 by maintainers)

github_iconTop GitHub Comments

0reactions
reuwicommented, Nov 10, 2022

It’s been 5 years since this issue was created…so has any progress?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found