45 releases (24 breaking)
0.36.0 | Nov 9, 2024 |
---|---|
0.34.0 | Oct 26, 2024 |
0.22.1 | Jul 28, 2024 |
0.0.1 | Mar 9, 2024 |
#21 in #import-export
569 downloads per month
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
.
- get imported variables https://github.com/guybedford/es-module-lexer/issues/163
- track star exports as imports as well https://github.com/guybedford/es-module-lexer/issues/76
- TypeScript specific syntax
- TypeScript
type
import / export keyword
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
~116K SLoC