pierrec / node-lz4

LZ4 fast compression algorithm for NodeJS
MIT License
438 stars 98 forks source link

Fix browser field in package json #64

Closed ghost closed 6 years ago

ghost commented 6 years ago

This leads webpack to use the correct browser-build. Fixes #63

pierrec commented 6 years ago

I agree with you, but I believe there is a typo in your file though: "browser": ".build/lz4.js" instead of "browser": "./build/lz4.js"

ghost commented 6 years ago

Yep, fixed it..

pierrec commented 6 years ago

Thanks.

buu700 commented 6 years ago

This change broke webpack for me. Now I'm getting:

ERROR in /cyph/shared/node_modules/lz4/lib/utils.js
Module not found: Error: Can't resolve '../build/Release/lz4' in '/cyph/shared/node_modules/lz4/lib'
 @ /cyph/shared/node_modules/lz4/lib/utils.js 38:19-50
 @ /cyph/shared/node_modules/lz4/lib/static.js
 @ /cyph/shared/node_modules/lz4/lib/lz4.js
 @ /cyph/shared/js/cyph/crypto/potassium/sign.ts
 @ /cyph/shared/js/cyph/crypto/potassium/index.ts

ERROR in /cyph/shared/node_modules/lz4/lib/utils.js
Module not found: Error: Can't resolve '../build/Release/xxhash' in '/cyph/shared/node_modules/lz4/lib'
 @ /cyph/shared/node_modules/lz4/lib/utils.js 4:10-44
 @ /cyph/shared/node_modules/lz4/lib/static.js
 @ /cyph/shared/node_modules/lz4/lib/lz4.js
 @ /cyph/shared/js/cyph/crypto/potassium/sign.ts
 @ /cyph/shared/js/cyph/crypto/potassium/index.ts