@zykj2024/much-library 1.1.7-beta.10 → 1.1.7-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,9 @@ import { transformNumber } from "../uploadTools";
3
3
 
4
4
  // 创建一个纯js计算线程
5
5
  var createWebWorker = function createWebWorker() {
6
- return new Worker(new URL('./md5Worker.js', import.meta.url));
6
+ return new Worker(new URL('./md5Worker.js', import.meta.url), {
7
+ type: 'module'
8
+ });
7
9
  };
8
10
 
9
11
  // 获取用户cpu核心数用于控制并发线程数量
@@ -1,5 +1,7 @@
1
1
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ // @ts-ignore
4
+ self.importScripts('spark-md5');
3
5
  var SparkMD5 = require('spark-md5');
4
6
  // 一期因为hash-wasm和spark-md5的兼容性问题,暂时使用spark-md5
5
7
  var hashTool = new SparkMD5.ArrayBuffer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykj2024/much-library",
3
- "version": "1.1.7-beta.10",
3
+ "version": "1.1.7-beta.11",
4
4
  "description": "react library",
5
5
  "license": "MIT",
6
6
  "module": "dist/esm/index.js",