44 releases (23 breaking)

new 0.35.0 Nov 4, 2024
0.33.0 Oct 24, 2024
0.22.1 Jul 28, 2024
0.0.1 Mar 9, 2024

#20 in #import-export

Download history 108/week @ 2024-07-15 220/week @ 2024-07-22 199/week @ 2024-07-29 315/week @ 2024-08-05 300/week @ 2024-08-12 174/week @ 2024-08-19 1/week @ 2024-08-26 303/week @ 2024-09-02 259/week @ 2024-09-09 298/week @ 2024-09-16 919/week @ 2024-09-23 162/week @ 2024-09-30 170/week @ 2024-10-07 125/week @ 2024-10-14 259/week @ 2024-10-21 27/week @ 2024-10-28

581 downloads per month

MIT license

2MB
46K 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

~6–11MB
~118K SLoC