You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support import.meta in scripts (via allowImportExportEverywhere).
Previously the acorn parser would always throw an error when it hits
an `import.meta` expression while parsing a script, while it would
happily parse `import` and `export` (and in particular dynamic
`import()`) outside of modules as long as `allowImportExportEverywhere`
was set to `true`. This changes the behavior to also allow `import.meta`
in scripts as long as `allowImportExportEverywhere` is `true`.
The motivation here is for the Chromium DevTools pretty print feature,
where we use the acorn parser, and where we don't necessarily know for
sure whether the user is trying to pretty print a module or a script,
and for the purpose of pretty printing that doesn't really matter anyways.
Issue: https://crbug.com/1185578
0 commit comments