add empty logger functions turbopack fallback (#58742)
This commit is contained in:
9
empty.ts
9
empty.ts
@@ -1,3 +1,12 @@
|
|||||||
// Empty module to satisfy Turbopack resolveAlias fallback for Node.js modules
|
// Empty module to satisfy Turbopack resolveAlias fallback for Node.js modules
|
||||||
// See turbopack config in next.config.ts
|
// See turbopack config in next.config.ts
|
||||||
|
|
||||||
|
// No-op function that returns itself for chaining
|
||||||
|
export const createLogger = () => ({
|
||||||
|
info: () => {},
|
||||||
|
warn: () => {},
|
||||||
|
error: () => {},
|
||||||
|
debug: () => {},
|
||||||
|
})
|
||||||
|
|
||||||
export default {}
|
export default {}
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ const config: NextConfig = {
|
|||||||
async_hooks: {
|
async_hooks: {
|
||||||
browser: './empty.ts', // Point to empty module when async_hooks is requested for browser
|
browser: './empty.ts', // Point to empty module when async_hooks is requested for browser
|
||||||
},
|
},
|
||||||
|
'@/observability/logger': {
|
||||||
|
browser: './empty.ts',
|
||||||
|
},
|
||||||
|
'@/observability/logger/lib/logger-context': {
|
||||||
|
browser: './empty.ts',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user