!265 modify filter worker condition

Merge pull request !265 from zrg/cherry-pick-1653623311
This commit is contained in:
openharmony_ci
2022-05-27 09:47:02 +00:00
committed by Gitee
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)