Browse Source

Pull request #3075: 无JIRA任务 更新loader

Merge in VISUAL/fineui from ~TELLER/fineui:master to master

* commit '6676cce38bb4a3553df6c5c274d162c6cfd4c620':
  chore: update
es6
Teller-杨派 2 years ago
parent
commit
89f9769ecc
  1. 7
      plugins/webpack-fui-worker-plugin/worker-loader.js

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

@ -117,16 +117,13 @@ function loader() {
// 添加 @ts-nocheck 避免 ts-check 报错 // 添加 @ts-nocheck 避免 ts-check 报错
// 修复export const 下 const不会被转译的问题 // 修复export const 下 const不会被转译的问题
`// @ts-nocheck `// @ts-nocheck
const blob = new Blob([${JSON.stringify(compilation.assets[entry].source())}]); export default window.URL.createObjectURL(new Blob([${JSON.stringify(compilation.assets[entry].source())}]));
const workerUrl = window.URL.createObjectURL(blob);
export default workerUrl;
` `
) )
: callback( : callback(
null, null,
`// @ts-nocheck `// @ts-nocheck
const servicePath = __webpack_public_path__ + ${JSON.stringify(entry)}; export default __webpack_public_path__ + ${JSON.stringify(entry)};
export default servicePath;
` `
) )
}); });

Loading…
Cancel
Save