VueJS Global Configuration of the Vue object

The Vue.config object has these properties, which you can modify when you create the instance:

PropertyDescription
silentdefaults to false, if true suppress logs and warnings
optionMergeStrategiesallows to define a custom merging strategy for options
devtoolsdefaults to true in development, and false in production. You can override those values.
errorHandlerallows to set an error handler function. Useful to hook Sentry and other similar services
warnHandlerallows to set a warning handler function, similar to errorHandler, but for warnings instead of errors
ignoredElementsused to let Vue ignore custom elements defined outside of it, like Web Components.
keyCodeslet you define custom key aliases for v-on
performancedefaults to false. If set to true, traces the performance of Vue components in the Browser DevTools.
productionTipdefaults to true. Set to false to disable the warning “you’re in development mode” during development in the console.

DOM

elsets the DOM element where the instance mounts on. It can be a CSS Selector, or an HTMLElement
templateis a template, represented as a string, that will replace the mounted element
renderalternatively, to define the template, you can define a template using a render function
renderErrorset an alternative output when the function attached to render fails

Vue instance assets

directivesthe set of directives to associate to the Vue instance
filtersthe set of filters to associate to the Vue instance
componentsthe set of components to associate to the Vue instance

Vue composition options

parentspecifies the parent instance
mixinssets an array of mixin objects
extendsextend another component

Other Vue object options

namesetting a name to the component lets you invoke it, useful in debugging or when you need to recursively add a component in its template
functionalif true, sets the component to be stateless (no data) and instances (no this), making it more lightweight
modelallows customizing the property used in events, useful for example when interacting with forms
commentsdefaults to false. If set to true, retains the HTML comments that are put in templates

Leave a Reply

Your email address will not be published. Required fields are marked *