From 5b7bc5bf1380a06306216df4cc36d7c9762b6d9e Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Fri, 19 Jul 2024 09:28:53 -0400 Subject: [PATCH] fix(module-federation): do not cache assets from static serve --- .../lib/start-static-remotes-file-server.ts | 1 + .../module-federation-dev-server.impl.ts | 1 + .../module-federation-dev-server.impl.ts | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/angular/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.ts b/packages/angular/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.ts index 135d49daca440..8db15b86fbbd6 100644 --- a/packages/angular/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.ts +++ b/packages/angular/src/executors/module-federation-dev-server/lib/start-static-remotes-file-server.ts @@ -56,6 +56,7 @@ export function startStaticRemotesFileServer( ssl: options.ssl, sslCert: options.sslCert, sslKey: options.sslKey, + cacheSeconds: -1, }, context ); diff --git a/packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts b/packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts index 655f4d666e8ff..78f34f06e30d9 100644 --- a/packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts +++ b/packages/angular/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts @@ -56,6 +56,7 @@ export async function* moduleFederationDevServerExecutor( spa: false, withDeps: false, cors: true, + cacheSeconds: -1, }, context ) diff --git a/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts b/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts index 6a30320eb2790..825d29bb91e27 100644 --- a/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts +++ b/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts @@ -107,6 +107,7 @@ function startStaticRemotesFileServer( ssl: options.ssl, sslCert: options.sslCert, sslKey: options.sslKey, + cacheSeconds: -1, }, context ); @@ -267,6 +268,7 @@ export default async function* moduleFederationDevServer( withDeps: false, spa: false, cors: true, + cacheSeconds: -1, }, context )