add proper ecmaVersion and sourceType to parse api
This commit is contained in:
parent
d4944d606b
commit
061561bfd8
@ -55,7 +55,8 @@ export function transformFileSync(filename: string, opts?: Object = {}) {
|
||||
}
|
||||
|
||||
export function parse(code, opts = {}) {
|
||||
opts.ecmaVersion = 6;
|
||||
opts.sourceType = "module";
|
||||
opts.ecmaVersion = Infinity;
|
||||
opts.plugins = {
|
||||
flow: true,
|
||||
jsx: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user