Closed namero999 closed 3 years ago
If tree shaking is enabled in your Webpack configuration, it will only bundle the md5 algorithm in the way you described.
Otherwise, you can directly import the md5 bundle:
import { md5 } from 'hash-wasm/dist/md5.umd.min.js
I don't recommend it, because the types declarations are not working in this case.
Is this supposed to be taken care of via tree-shaking at build time?
Or is there a better way?
Thanks!