From 9ee2a3b14c0f18aa46912d04be879ac1b257637b Mon Sep 17 00:00:00 2001 From: zhangrengao Date: Fri, 27 May 2022 11:30:23 +0800 Subject: [PATCH] fixed d64dfbb from https://gitee.com/zhangrengao1/developtools_ace-js2bundle/pulls/264 modify filter worker condition Signed-off-by: zhangrengao Change-Id: Ifd9ca09097e0eba2f3ed8791f2894ec7e738d43a --- ace-loader/src/genAbc-plugin.js | 2 +- ace-loader/src/genBin-plugin.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ace-loader/src/genAbc-plugin.js b/ace-loader/src/genAbc-plugin.js index fbb6a99..a4de364 100644 --- a/ace-loader/src/genAbc-plugin.js +++ b/ace-loader/src/genAbc-plugin.js @@ -66,7 +66,7 @@ class GenAbcPlugin { // choice *.js if (output && path.extname(key) === '.js') { let newContent = assets[key].source(); - if (key.search('./workers/') !== 0 && key !== 'commons.js' && key !== 'vendors.js') { + if (key.search('workers/') !== 0 && key !== 'commons.js' && key !== 'vendors.js') { newContent = forward + newContent + last; } if (key === 'commons.js' || key === 'vendors.js') { diff --git a/ace-loader/src/genBin-plugin.js b/ace-loader/src/genBin-plugin.js index f8f4d87..16d372a 100644 --- a/ace-loader/src/genBin-plugin.js +++ b/ace-loader/src/genBin-plugin.js @@ -55,7 +55,7 @@ class GenBinPlugin { // choice *.js if (output && webpackPath && path.extname(key) === '.js') { let newContent = assets[key].source() - if (key.search('./workers/') !== 0) { + if (key.search('workers/') !== 0) { newContent = forward + newContent + last } const keyPath = key.replace(/\.js$/, firstFileEXT)