-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Choose one: is this a bug report or feature request?
Feature request
Expected Behavior
When creating tooling, there are multiple reasons to use babel as part of the pipeline. For instance there is an Istanbul plugin for coverage and Jest uses it for mock hoisting.
But since babel has to be able to parse the code in order to make changes to it, features working without Babel present will break when parsed by Babel if the syntax plugins are not present (see istanbuljs/babel-plugin-istanbul#141 and jestjs/jest#4519).
I expect to be able to run Babel on code that parses fine using Node. But just parsing all possible syntax makes sense to me, so that we can apply transformations to the parts we care about without Babel blowing up.
Current Behavior
Syntax error for e.g. Object spread
Possible Solution
A preset containing all syntax plugins. Not sure about stages...
Context
See "Expected Behavior"
Your Environment
software | version(s) |
---|---|
Babel | 6.x and 7.x |
Babylon | |
node | 8 |
npm | 5 |
Operating System | macOS |