oxc/crates/oxc_module_lexer
Kevin Deng 三咲智子 d22bd2082a
feat(module_lexer): distinguish for types-only imports and exports (#5184)
Co-authored-by: Boshen <boshenc@gmail.com>
2024-08-25 18:22:44 +08:00
..
examples chore: make println and eprintln opt-in (#3712) 2024-06-17 10:40:34 +00:00
src feat(module_lexer): distinguish for types-only imports and exports (#5184) 2024-08-25 18:22:44 +08:00
tests feat(module_lexer): distinguish for types-only imports and exports (#5184) 2024-08-25 18:22:44 +08:00
Cargo.toml Release crates v0.25.0 (#5107) 2024-08-23 15:37:36 +08:00
CHANGELOG.md Release crates v0.16.0 (#3930) 2024-06-27 20:38:31 +08:00
README.md

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).