modify filter worker condition

Signed-off-by: zhangrengao <zhangrengao1@huawei.com>
Change-Id: Ifd9ca09097e0eba2f3ed8791f2894ec7e738d43a
This commit is contained in:
zhangrengao
2022-05-27 11:30:23 +08:00
parent 3f9c94fd86
commit 13f72b8b16
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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') {
+1 -1
View File
@@ -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)