diff --git a/libs/native-federation-core/src/lib/core/bundle-shared.ts b/libs/native-federation-core/src/lib/core/bundle-shared.ts index 0d18b721..1a5be62e 100644 --- a/libs/native-federation-core/src/lib/core/bundle-shared.ts +++ b/libs/native-federation-core/src/lib/core/bundle-shared.ts @@ -38,7 +38,7 @@ export async function bundleShared( const bundleCache = cacheEntry( cacheOptions.pathToCache, - getFilename(cacheOptions.bundleName), + getFilename(cacheOptions.bundleName, fedOptions.dev), ); if (fedOptions?.cacheExternalArtifacts) { diff --git a/libs/native-federation-core/src/lib/utils/bundle-caching.ts b/libs/native-federation-core/src/lib/utils/bundle-caching.ts index 514b3e50..c4344434 100644 --- a/libs/native-federation-core/src/lib/utils/bundle-caching.ts +++ b/libs/native-federation-core/src/lib/utils/bundle-caching.ts @@ -8,8 +8,9 @@ import { logger } from '../utils/logger'; export const getCachePath = (workspaceRoot: string, project: string) => path.join(workspaceRoot, 'node_modules/.cache/native-federation', project); -export const getFilename = (title: string) => { - return `${title}.meta.json`; +export const getFilename = (title: string, dev?: boolean) => { + const devSuffix = dev ? '-dev' : ''; + return `${title}${devSuffix}.meta.json`; }; export const getChecksum = (