From b26afd047d2e3cacce574eb77c269e50dcf91c5b Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 16 Sep 2022 13:58:29 +0800 Subject: [PATCH] chore: update --- plugins/webpack-fui-worker-plugin/worker-loader.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js index 23be31927..c9dad87d5 100644 --- a/plugins/webpack-fui-worker-plugin/worker-loader.js +++ b/plugins/webpack-fui-worker-plugin/worker-loader.js @@ -117,16 +117,13 @@ function loader() { // 添加 @ts-nocheck 避免 ts-check 报错 // 修复export const 下 const不会被转译的问题 `// @ts-nocheck - const blob = new Blob([${JSON.stringify(compilation.assets[entry].source())}]); - const workerUrl = window.URL.createObjectURL(blob); - export default workerUrl; + export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}])); ` ) : callback( null, `// @ts-nocheck - const servicePath = __webpack_public_path__ + ${JSON.stringify(entry)}; - export default servicePath; + export default __webpack_public_path__ + ${JSON.stringify(entry)}; ` ) });