3 unstable releases

new 0.13.1 May 22, 2024
0.13.0 May 16, 2024
0.0.1 Mar 9, 2024

#23 in #import-export

Download history 110/week @ 2024-03-04 32/week @ 2024-03-11 21/week @ 2024-04-01 115/week @ 2024-05-13

115 downloads per month

MIT license

655KB
15K SLoC

Oxc Module Lexer

This is not a lexer. The name "lexer" is used for easier recognition.

es-module-lexer

Outputs the list of exports and locations of import specifiers, including dynamic import and import meta handling.

Does not have any limitations mentioned in es-module-lexer.

cjs-module-lexer

  • TODO

Benchmark

This is 2 times slower than es-module-lexer, but will be significantly faster when TypeScript is processed.

The difference is around 10ms vs 20ms on a large file (700k).


lib.rs:

ESM module lexer

Dependencies

~3.5–9.5MB
~82K SLoC