oxc/crates/oxc_module_lexer
2024-11-03 12:16:47 +00:00
..
examples chore: make println and eprintln opt-in (#3712) 2024-06-17 10:40:34 +00:00
src refactor(rust): remove the annoying clippy::wildcard_imports (#6860) 2024-10-24 13:57:19 +00:00
tests/integration test(module_lexer): use a single integration test for faster compilation (#7097) 2024-11-03 12:16:47 +00:00
Cargo.toml release(crates): v0.34.0 (#6908) 2024-10-26 09:39:53 +08:00
CHANGELOG.md release(crates): v0.34.0 (#6908) 2024-10-26 09:39:53 +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).