guybedford / es-module-lexer

Low-overhead lexer dedicated to ES module parsing for fast analysis
MIT License
917 stars 47 forks source link

feat: add support for import assertions #74

Closed guybedford closed 3 years ago

guybedford commented 3 years ago

Adds support for parsing import assertions.

Three variables are used - "a", "as" and "ae".

For static imports these correspond to:

For dynamic imports, "as" and "ae" are not used, instead only "a":

Resolves https://github.com/guybedford/es-module-lexer/issues/73.

LarsDenBakker commented 3 years ago

Thanks for this!