pieroxy / lz-string

LZ-based compression algorithm for JavaScript
MIT License
4.08k stars 567 forks source link

Feature request: a non minified js file as a result of building v2 #238

Closed Georg-Git closed 5 months ago

Georg-Git commented 5 months ago

I am aware that building v2 will create also the former called lz-string.min.js

now called dist/index.umd.js

I would like to see also a non minified js file as a result of the building process.

Georg-Git commented 5 months ago

By the way: why not using the old file names: dist/lz-string.min.js (instead of index.umd.js) dist/lz-string.js (this feature request)

Rycochet commented 5 months ago

The build creates sourcemaps, which are the modern alternative to having unminified code (anything that is built does not have a 1:1 source match, and the sourcemap gives that information).

Generally people also want and use modern practices which include allowing for tree shaking and only including the functions they want.

Both the filenames and paths have both changed, plus there are some fixes going in, which means that anyone wanting to update should check what is different - if they are using any form of bundler then it should handle the updated version transparently, but for anyone trying to use in a browser directly that it likely to cause problems - hence the change in filenames inside the package (it's a minor thing, but quite important to get right, code that old is far more likely to do things "wrong").