bcrypt.js icon indicating copy to clipboard operation
bcrypt.js copied to clipboard

Support bundling bcryptjs for client side usage

Open lewispham opened this issue 6 years ago • 6 comments

Right now, in order to use bcryptjs on browsers, we have to manually include the pre-bundled script into the main html file then access it via dcodeIO.bcrypt. I think that it will be nicer if we can use bcryptjs like this instead.

import bcryptjs from 'bcryptjs';
bcryptjs.hash(...)

Then we can easily bundle it along with other js files with tools like webpack or rollup.

lewispham avatar Sep 17 '17 16:09 lewispham

@lewispham can you provide a PR? Then @dcodeIO can review it and merge.

Ruffio avatar Apr 03 '18 13:04 Ruffio

@Ruffio I think I can probably handle this but I'm just not sure about @dcodeIO 's opinion.

lewispham avatar Apr 20 '18 17:04 lewispham

@lewispham - I'd say go for it anyway. Worst that happens is you end up with a fork that has a useful extra feature... I'm currently trying to get this to run under react native, and having no luck at all.

jh3141 avatar May 05 '18 16:05 jh3141

@lewispham would you provide a PR?

Ruffio avatar Jul 06 '18 08:07 Ruffio

@jh3141 still have nothing so far for react native?

SeamusY avatar Jul 16 '18 07:07 SeamusY

Sorry for the late reply. I've been a bit busy during the time. I've just created the PR #87 for this issue. Basically, this PR will add supports for bundling bcrypt.js via build tools like webpack or rollup. Please be aware that prebuilt dists and the global entry dcodeIO.bcrypt will also be removed. You can feel free to give feedback here. Thanks.

lewispham avatar Aug 23 '18 07:08 lewispham