From 9bc78212767f8547e06942b1f9d6e3addf3ad0ae Mon Sep 17 00:00:00 2001 From: Sylar Date: Fri, 4 Nov 2022 14:51:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-83708=20fix:=20=E5=88=9B=E5=BB=BABlo?= =?UTF-8?q?b=E6=97=B6=E6=8C=87=E5=AE=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webpack-fui-worker-plugin/worker-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js index c9dad87d5..2c19eecce 100644 --- a/plugins/webpack-fui-worker-plugin/worker-loader.js +++ b/plugins/webpack-fui-worker-plugin/worker-loader.js @@ -117,7 +117,7 @@ function loader() { // 添加 @ts-nocheck 避免 ts-check 报错 // 修复export const 下 const不会被转译的问题 `// @ts-nocheck - export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}])); + export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}], { type: 'text/javascript' })); ` ) : callback( From fcd96709d9935480e6dfe954241fed74a415b953 Mon Sep 17 00:00:00 2001 From: Sylar Date: Fri, 4 Nov 2022 14:51:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-83708=20fix:=20=E5=88=9B=E5=BB=BABlo?= =?UTF-8?q?b=E6=97=B6=E6=8C=87=E5=AE=9A=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webpack-fui-worker-plugin/worker-loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js index 2c19eecce..d07756e01 100644 --- a/plugins/webpack-fui-worker-plugin/worker-loader.js +++ b/plugins/webpack-fui-worker-plugin/worker-loader.js @@ -116,6 +116,7 @@ function loader() { // 插入代码的转译和压缩由主构建配置的 babel/ts loader 处理, 不需要 worker-worker 来处理 // 添加 @ts-nocheck 避免 ts-check 报错 // 修复export const 下 const不会被转译的问题 + // safari浏览器下blob需指定type `// @ts-nocheck export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}], { type: 'text/javascript' })); `