diff --git a/compiler/src/utils.ts b/compiler/src/utils.ts index 64aaa297b5991518a03ca7a5a5b04ce7fd6fb3e9..4f8d97c7afd3e49ec0df1594446981ac95792018 100644 --- a/compiler/src/utils.ts +++ b/compiler/src/utils.ts @@ -966,7 +966,13 @@ export function getRollupCacheStoreKey(projectConfig: object): string { } export function getRollupCacheKey(projectConfig: object): string { - let keyInfo: string[] = [projectConfig.entryModuleName, !!projectConfig.widgetCompile]; + let isWidget: string = projectConfig.widgetCompile ? 'widget' : 'non-widget'; + let ohosTestInfo: string = 'non-ohosTest'; + if (projectConfig.testFrameworkPar) { + ohosTestInfo = JSON.stringify(projectConfig.testFrameworkPar); + } + + let keyInfo: string[] = [projectConfig.entryModuleName, isWidget, ohosTestInfo]; return keyInfo.join('#'); }