0π
1) In Vue, calling Vue.use( Plugin, Options ) makes the plugin available throughout the application. Itβs basically a way to bootstrap a plugin i.e. Vue-Toasted, so you can use it throughout your application. You can define configuration options as well here.
2) Vue.component is used to register (your own) components in the application. It allows them to be used within each other component, without having to define them in each file. Think of the app.js file as the bootstrap file, it defines all of the plugins, components, etc. and registers them for use in Vue. require is importing the file and Vue is parsing the template and object. Note this is all compiled in webpack and cannot load in a browser as-is.
- [Vuejs]-How to change VUE main.js to use routers/index.js
- [Vuejs]-Vue.js pasing object to orher components
Source:stackexchange.com