Browse Source

Merge branch 'master' of ssh://code.fineres.com:7999/~dailer/fineui

es6
zsmj 2 years ago
parent
commit
5aee5bff05
  1. 2
      package.json
  2. 6
      plugins/webpack-fui-worker-plugin/worker-loader.js

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20220824165610",
"version": "2.0.20220825115604",
"description": "fineui",
"main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts",

6
plugins/webpack-fui-worker-plugin/worker-loader.js

@ -115,16 +115,18 @@ function loader() {
null,
// 插入代码的转译和压缩由主构建配置的 babel/ts loader 处理, 不需要 worker-worker 来处理
// 添加 @ts-nocheck 避免 ts-check 报错
// 修复export const 下 const不会被转译的问题
`// @ts-nocheck
const blob = new Blob([${JSON.stringify(compilation.assets[entry].source())}]);
export const workerUrl = window.URL.createObjectURL(blob);
const workerUrl = window.URL.createObjectURL(blob);
export default workerUrl;
`
)
: callback(
null,
`// @ts-nocheck
const servicePath = __webpack_public_path__ + ${JSON.stringify(entry)};
export const workerUrl = servicePath;
export default servicePath;
`
)
});

Loading…
Cancel
Save