fix(hash.js): correctly pre-build hash.js for the browser
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"build": "trash build && yarn build:main && yarn build:module && yarn build:browser-deps && yarn build:browser && yarn build:browser-cjs",
|
||||
"build:main": "tsc -p tsconfig.json",
|
||||
"build:module": "tsc -p config/exports/tsconfig.module.json",
|
||||
"build:browser-deps": "mkdirp build/temp && browserify node_modules/hash.js/lib/hash.js -o build/temp/hash.js",
|
||||
"build:browser-deps": "mkdirp build/temp && browserify node_modules/hash.js/lib/hash.js --standalone hash -o build/temp/hash.js",
|
||||
"build:browser": "rollup -c config/exports/rollup.config.js -f es -o build/browser/index.js",
|
||||
"build:browser-cjs": "rollup -c config/exports/rollup.config.js -f cjs -o build/browser/index.cjs.js",
|
||||
"build:tests": "node config/exports/build-tests.js",
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
import hash from 'hash.js'
|
||||
|
||||
export function createHash (algorithm: 'sha256') {
|
||||
console.log(hash)
|
||||
return hash.sha256()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user