How to make vue 3 silent?

Viewed 1057
2 Answers

It seems it's been removed in Vue3 but I can't find any reference to it in the docs.

The config has custom error/warning handlers which you could use to return null instead:

const app = Vue.createApp({});

app.config.errorHandler = () => null;
app.config.warnHandler = () => null;

app.mount("#app");
<script src="https://unpkg.com/vue@next"></script>
<div id="app">{{ anError.value }}</div>

You can add devServer field inside your vue.config.js configuration file with an object with the following entry:

{
    clientLogLevel: 'silent',
}

See this documentation page and this one for details.

Related