oxc/crates/oxc_module_lexer
2024-05-22 16:50:30 +08:00
..
examples New tool: oxc_module_lexer (#2650) 2024-03-09 23:23:55 +08:00
src refactor(ast): squash nested enums (#3115) 2024-04-28 20:40:37 +08:00
tests New tool: oxc_module_lexer (#2650) 2024-03-09 23:23:55 +08:00
Cargo.toml Release crates v0.13.1 2024-05-22 16:50:30 +08:00
CHANGELOG.md Release crates v0.13.1 2024-05-22 16:50:30 +08:00
README.md New tool: oxc_module_lexer (#2650) 2024-03-09 23:23:55 +08:00

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