Aevann1 67a1595b9b | ||
---|---|---|
.. | ||
lib | ||
LICENSE | ||
README.md | ||
package.json | ||
source-map.d.ts | ||
source-map.js |
README.md
Source Map JS
Difference between original source-map:
TL,DR: it's fork of original source-map@0.6, but with perfomance optimizations.
This journey starts from source-map@0.7.0. Some part of it was rewritten to Rust and WASM and API became async.
It's still a major block for many libraries like PostCSS or Webpack for example because they need to migrate the whole API to the async way. This is the reason why 0.6.1 has 2x more downloads than 0.7.3 while it's faster several times.
More important that WASM version has some optimizations in JS code too. This is why community asked to create branch for 0.6 version and port these optimizations but, sadly, the answer was «no». A bit later I discovered the issue created by Ben Rothman (@benthemonkey) with no response at all.
Roman Dvornov (@lahmatiy) wrote a serveral posts (russian, only, sorry) about source-map library in his own Telegram channel. He mentioned the article «Maybe you don't need Rust and WASM to speed up your JS» written by Vyacheslav Egorov (@mraleph). This article contains optimizations and hacks that lead to almost the same performance compare to WASM implementation.
I decided to fork the original source-map and port these optimizations from the article and several others PR from the original source-map.
This is a library to generate and consume the source map format described here.
Docs
Read full docs on GitHub.