use xxhashjs instead which will also work on windows
This commit is contained in:
parent
a53c061f27
commit
d51d43abfe
3 changed files with 4 additions and 16 deletions
|
@ -43,6 +43,6 @@
|
||||||
"rollup": "^2.26.4",
|
"rollup": "^2.26.4",
|
||||||
"rollup-plugin-cleanup": "^3.1.1",
|
"rollup-plugin-cleanup": "^3.1.1",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"xxhash": "^0.3.0"
|
"xxhashjs": "^0.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ import cheerio from "cheerio";
|
||||||
import fsRoot from "fs";
|
import fsRoot from "fs";
|
||||||
const fs = fsRoot.promises;
|
const fs = fsRoot.promises;
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import XXHash from 'xxhash';
|
import xxhash from 'xxhashjs';
|
||||||
import { rollup } from 'rollup';
|
import { rollup } from 'rollup';
|
||||||
import postcss from "postcss";
|
import postcss from "postcss";
|
||||||
import postcssImport from "postcss-import";
|
import postcssImport from "postcss-import";
|
||||||
|
@ -361,7 +361,7 @@ function resource(relPath, content) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function contentHash(str) {
|
function contentHash(str) {
|
||||||
var hasher = new XXHash(0);
|
var hasher = new xxhash.h32(0);
|
||||||
hasher.update(str);
|
hasher.update(str);
|
||||||
return hasher.digest();
|
return hasher.digest();
|
||||||
}
|
}
|
||||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -1464,11 +1464,6 @@ ms@^2.1.1:
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||||
|
|
||||||
nan@^2.13.2:
|
|
||||||
version "2.14.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
|
|
||||||
integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
|
|
||||||
|
|
||||||
node-releases@^1.1.60:
|
node-releases@^1.1.60:
|
||||||
version "1.1.60"
|
version "1.1.60"
|
||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.60.tgz#6948bdfce8286f0b5d0e5a88e8384e954dfe7084"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.60.tgz#6948bdfce8286f0b5d0e5a88e8384e954dfe7084"
|
||||||
|
@ -1870,14 +1865,7 @@ wrappy@1:
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||||
|
|
||||||
xxhash@^0.3.0:
|
xxhashjs@^0.2.1, xxhashjs@^0.2.2:
|
||||||
version "0.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/xxhash/-/xxhash-0.3.0.tgz#d20893a62c5b0f7260597dd55859b12a1e02c559"
|
|
||||||
integrity sha512-1ud2yyPiR1DJhgyF1ZVMt+Ijrn0VNS/wzej1Z8eSFfkNfRPp8abVZNV2u9tYy9574II0ZayZYZgJm8KJoyGLCw==
|
|
||||||
dependencies:
|
|
||||||
nan "^2.13.2"
|
|
||||||
|
|
||||||
xxhashjs@^0.2.1:
|
|
||||||
version "0.2.2"
|
version "0.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8"
|
resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8"
|
||||||
integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==
|
integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw==
|
||||||
|
|
Reference in a new issue