Skip to content

Commit cff4db2

Browse files
committed
fix(dev): hide timestamp and remove outdated filters
1 parent 4ac2954 commit cff4db2

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

packages/nuxi/src/utils/console.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,6 @@ function wrapReporter(reporter: ConsolaReporter) {
1414
}
1515
const msg = logObj.args[0]
1616
if (typeof msg === 'string' && !process.env.DEBUG) {
17-
// Hide vue-router 404 warnings
18-
if (
19-
msg.startsWith(
20-
'[Vue Router warn]: No match found for location with path',
21-
)
22-
) {
23-
return
24-
}
25-
// Suppress warning about native Node.js fetch
26-
if (
27-
msg.includes(
28-
'ExperimentalWarning: The Fetch API is an experimental feature',
29-
)
30-
) {
31-
return
32-
}
3317
// TODO: resolve upstream in Vite
3418
// Hide sourcemap warnings related to node_modules
3519
if (msg.startsWith('Sourcemap') && msg.includes('node_modules')) {
@@ -42,6 +26,7 @@ function wrapReporter(reporter: ConsolaReporter) {
4226
}
4327

4428
export function setupGlobalConsole(opts: { dev?: boolean } = {}) {
29+
consola.options.formatOptions.date = false
4530
consola.options.reporters = consola.options.reporters.map(wrapReporter)
4631

4732
// Wrap all console logs with consola for better DX

0 commit comments

Comments
 (0)