oxc/crates/oxc_module_lexer
2024-06-08 16:35:16 +08:00
..
examples
src refactor(ast): squash nested enums (#3115) 2024-04-28 20:40:37 +08:00
tests fix(parser): should parser error when function declaration has no name (#3461) 2024-05-30 19:58:50 +08:00
Cargo.toml chore: crates should only publish src and examples directory 2024-06-08 16:35:16 +08:00
CHANGELOG.md chore: regenerate changelogs with commit id and author 2024-06-07 01:22:28 +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).