how to solve webpack and bcrypt incompatibility issue


I found bcrypt is not compatible with webpack.



Quote from issue



bcrypt is not designed to be run there. bcrypt is a native (C++)
module and only runs on node environments.



You can use bcrypt.js as a (mostly) drop-in replacement.



However bcrpt.js is 30% slower than bcrypt. And since I'm really using node environment, I still want to use bcrypt rather than bcrypt.js.



What should I do? Should I bundle my JS code without dependency in node_module, and during deployment npm install?



For those who downvoted this question: This shouldn't go to webpack or bcrypt github issues which are not support forum.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

佛陀 (漫畫)

金賢洙

白葡萄酒