beenotung / compress-json

Store JSON data in space efficient manner
https://www.npmjs.com/package/compress-json
BSD 2-Clause "Simplified" License
108 stars 6 forks source link

Depends on window object #17

Closed latel88 closed 6 months ago

latel88 commented 6 months ago

https://github.com/beenotung/compress-json/blob/f90e5c8322f63e0c63d54d7c40d2c85202cf2894/src/browser.ts#L14 WebWorker cannot load the module because the above file depends on the window object. Can you add a workaround? Thanks

beenotung commented 6 months ago

You can import this package using commonjs / ESM convention, it is not depending on any DOM APIs.

The browser.ts is a wrapper for bundler to produce bundle build, which is available via CDN to support vanilla js style usage in the browser environment.