mirror of
https://gitee.com/openharmony/developtools_ace_js2bundle
synced 2024-11-27 01:20:27 +00:00
update ace-loader/src/resource-plugin.js.
Signed-off-by: 卡哥 <lizhouze@huawei.com>
This commit is contained in:
parent
bb993991a2
commit
83ed4d6890
@ -126,17 +126,7 @@ class ResourcePlugin {
|
||||
}
|
||||
apply(compiler) {
|
||||
compiler.hooks.beforeCompile.tap('resource Copy', () => {
|
||||
if (multiResourceBuild.value) {
|
||||
const res = multiResourceBuild.value.res;
|
||||
if (res) {
|
||||
res.forEach(item => {
|
||||
circularFile(path.resolve(input, item), path.resolve(output, item), '');
|
||||
})
|
||||
}
|
||||
} else {
|
||||
circularFile(input, output, '');
|
||||
}
|
||||
circularFile(input, output, '../share');
|
||||
resourceCopy();
|
||||
});
|
||||
compiler.hooks.watchRun.tap('i18n', (comp) => {
|
||||
comp.removedFiles = comp.removedFiles || [];
|
||||
@ -179,6 +169,20 @@ class ResourcePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
function resourceCopy() {
|
||||
if (multiResourceBuild.value) {
|
||||
const res = multiResourceBuild.value.res;
|
||||
if (res) {
|
||||
res.forEach(item => {
|
||||
circularFile(path.resolve(input, item), path.resolve(output, item), '');
|
||||
})
|
||||
}
|
||||
} else {
|
||||
circularFile(input, output, '');
|
||||
}
|
||||
circularFile(input, output, '../share');
|
||||
}
|
||||
|
||||
function checkRemove(removedFiles) {
|
||||
if (removedFiles.length > 0) {
|
||||
removedFiles.forEach(file => {
|
||||
|
Loading…
Reference in New Issue
Block a user