webpack / webpack-sources

Source code handling classes for webpack
MIT License
261 stars 71 forks source link

Use @benthemonkey source-map fork #100

Closed 7rulnik closed 3 years ago

7rulnik commented 3 years ago

@benthemonkey made a source-map fork and backported https://github.com/mozilla/source-map/pull/308 to js implementation.

Patch diff: https://github.com/mozilla/source-map/compare/0.6.1...benthemonkey:patch-0.6.1

Sources of the idea: https://github.com/mozilla/source-map/issues/370 https://github.com/zulip/zulip/pull/16545

Related to https://github.com/webpack/webpack-sources/issues/34


I tried to run the benchmark in webpack repo but got jest error Your test suite must contain at least one test. Also, there is some problem with Travis, but tests passed on my machine.

alexander-akait commented 3 years ago

We need published package...

7rulnik commented 3 years ago

Yeah, repo can be deleted. @benthemonkey could you publish it to npm?

benthemonkey commented 3 years ago

Sure I'll do this today.

benthemonkey commented 3 years ago

https://www.npmjs.com/package/@benthemonkey/source-map

alexander-akait commented 3 years ago

Let's change it in package.json

7rulnik commented 3 years ago

@benthemonkey thanks for the rapid feedback!

@alexander-akait it's done

7rulnik commented 3 years ago

I think it's ready, but let's wait for https://github.com/benthemonkey/source-map/pull/1. I will try to polish and release it this weekend.

alexander-akait commented 3 years ago

@7rulnik thanks for fixing it

alexander-akait commented 3 years ago

@7rulnik feel free to ping me when it will be ready

7rulnik commented 3 years ago

@alexander-akait I finished optimizations and moved to https://www.npmjs.com/package/source-map-js

For more info see https://github.com/7rulnik/source-map/pull/2

As a result, parsing became 4x faster and serialization 30% faster

7rulnik commented 3 years ago

https://github.com/webpack/webpack-sources/issues/34#issuecomment-887332263