mirror of
https://github.com/openharmony/developtools_ace-js2bundle.git
synced 2026-07-21 14:15:45 -04:00
avoid add head&tail js text into files of workers directory
Signed-off-by: hufeng <hufeng20@huawei.com> Change-Id: Idff0d1ac7aabebb96c547acba7b66ba25d533adc
This commit is contained in:
@@ -66,7 +66,10 @@ class GenAbcPlugin {
|
||||
keys.forEach(key => {
|
||||
// choice *.js
|
||||
if (output && webpackPath && path.extname(key) === '.js') {
|
||||
const newContent = forward + assets[key].source() + last
|
||||
let newContent = assets[key].source()
|
||||
if (key.search('./workers/') != 0) {
|
||||
newContent = forward + newContent + last
|
||||
}
|
||||
const keyPath = key.replace(/\.js$/, firstFileEXT)
|
||||
writeFileSync(newContent, path.resolve(output, keyPath), key)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,10 @@ class GenBinPlugin {
|
||||
keys.forEach(key => {
|
||||
// choice *.js
|
||||
if (output && webpackPath && path.extname(key) === '.js') {
|
||||
const newContent = forward + assets[key].source() + last
|
||||
let newContent = assets[key].source()
|
||||
if (key.search('./workers/') != 0) {
|
||||
newContent = forward + newContent + last
|
||||
}
|
||||
const keyPath = key.replace(/\.js$/, firstFileEXT)
|
||||
writeFileSync(newContent, path.resolve(output, keyPath), key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user