diff --git a/lib/registry.ts b/lib/registry.ts index 2d2450730e..26fd81997d 100644 --- a/lib/registry.ts +++ b/lib/registry.ts @@ -256,12 +256,14 @@ if (config.debugInfo) { // Only enable tracing in debug mode app.get('/metrics', metrics); } -app.use( - '/*', - serveStatic({ - root: path.join(__dirname, 'assets'), - rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path), - }) -); +if (!config.isPackage) { + app.use( + '/*', + serveStatic({ + root: path.join(__dirname, 'assets'), + rewriteRequestPath: (path) => (path === '/favicon.ico' ? '/favicon.png' : path), + }) + ); +} export default app;