File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ function createStream (opts) {
82
82
let ast
83
83
const string = transformAst ( source , {
84
84
locations : true ,
85
- ecmaVersion : 10 ,
85
+ ecmaVersion : opts . ecmaVersion !== undefined ? opts . ecmaVersion : 10 ,
86
86
inputFilename : row . file
87
87
} , ( node ) => {
88
88
if ( node . type === 'Program' ) ast = node
Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ Handler called when a module cannot be tree-shaked for some reason.
95
95
Handler called when tree-shaking is skipped entirely, usually because there is a dynamic ` require ` call in the source.
96
96
` reasons ` is an array of reasons for skipping tree-shaking.
97
97
98
+ ### ` ecmaVersion `
99
+
100
+ Parse with this ecmaVersion as interpreted by acorn. (default: 10)
101
+
98
102
## License
99
103
100
104
[ MIT] ( ./LICENSE )
You can’t perform that action at this time.
0 commit comments