next.js
8a360b19 - Make module IDs numbers instead of strings (#69431)

Commit
1 year ago
Make module IDs numbers instead of strings (#69431) Makes compressed (hashed) module IDs of type `ModuleId::Number` instead of `ModuleId::String`, which makes builds smaller by removing the need to add `"` before and after each ID. To fully use Javascript's `Number` capabilities, `ModuleId::Number` is changed from `u32` to `u64`, and `module_id_to_lit` ensures that numbers bigger than Javascript's `MAX_SAFE_INTEGER` are stringified in Javascript. We could also represent them es `BigInt`.
Author
lichu acuña
Parents
Loading