oxc/crates/oxc_module_lexer
2024-11-16 21:00:30 +08:00
..
examples
src fix(module_lexer): add missing export * from 'foo'; case (#7103) 2024-11-03 16:31:19 +00:00
tests/integration chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
Cargo.toml release(crates): v0.36.0 (#7227) 2024-11-10 00:31:14 +08:00
CHANGELOG.md release(crates): v0.35.0 (#7110) 2024-11-04 17:40:05 +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).