mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-20 19:47:44 -04:00
Signed-off-by: laibo102 <laibo2@huawei.com> Change-Id: Ied216f3587c317cac80fb4b31d9cbed50d645102
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@ function loadWorker(projectConfig) {
|
||||
const workerConfig = JSON.parse(fs.readFileSync(projectConfig.aceBuildJson).toString());
|
||||
workerConfig.workers.forEach(worker => {
|
||||
if (!/\.(ts|js)$/.test(worker)) {
|
||||
worker += '.ts'
|
||||
worker += '.ts';
|
||||
}
|
||||
const relativePath = path.relative(projectConfig.projectPath, worker);
|
||||
if (filterWorker(relativePath)) {
|
||||
|
||||
@@ -75,7 +75,6 @@ export class ResultStates {
|
||||
private modulePaths: Set<string> = new Set([]);
|
||||
|
||||
public apply(compiler: Compiler): void {
|
||||
|
||||
compiler.hooks.compilation.tap('SourcemapFixer', compilation => {
|
||||
compilation.hooks.afterProcessAssets.tap('SourcemapFixer', assets => {
|
||||
Reflect.ownKeys(assets).forEach(key => {
|
||||
@@ -110,14 +109,14 @@ export class ResultStates {
|
||||
stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS
|
||||
},
|
||||
(assets) => {
|
||||
const GLOBAL_COMMON_MODULE_CACHE = `
|
||||
const GLOBAL_COMMON_MODULE_CACHE = `
|
||||
globalThis["__common_module_cache__${projectConfig.hashProjectPath}"] =` +
|
||||
` globalThis["__common_module_cache__${projectConfig.hashProjectPath}"] || {};
|
||||
globalThis["webpackChunk${projectConfig.hashProjectPath}"].forEach((item)=> {
|
||||
Object.keys(item[1]).forEach((element) => {
|
||||
globalThis["__common_module_cache__${projectConfig.hashProjectPath}"][element] = null;
|
||||
})
|
||||
});`
|
||||
});`;
|
||||
|
||||
if (assets['commons.js']) {
|
||||
assets['commons.js'] = new CachedSource(
|
||||
|
||||
Reference in New Issue
Block a user