davidbonnet / astring

🌳 Tiny and fast JavaScript code generator from an ESTree-compliant AST.

Home Page:https://david.bonnet.cc/astring/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support ImportExpression

lega911 opened this issue · comments

Motivation

acorn supports import expression, would be good if astring would support it

function foo() {
  let x = import('./lib.js');
};

Example:
http://david.bonnet.cc/astring/demo/#function%20foo()%20%7B%0A%20%20let%20x%20=%20import('./lib.js');%0A%7D;

acorn: https://astexplorer.net/#/gist/483619a3efdbb70f83711f9a9c57a07c/6777ec9cde34c2c36bf6fe5191af827de93a7d7d

Added a PR

Thanks @lega911 for reporting this and @connor4312 for the contribution. Will deploy soon along with other improvements.