Passing plugin options
This is more of a support request, but also a suggestion on the documentation..
There's a whole section mentioning plugin options on each code sample, but nowhere does it says where the options come from:
- https://vuejs.org/guide/reusability/plugins.html
- https://github.com/vuejs/docs/edit/main/src/guide/reusability/plugins.md
As far as I could see, this is not even mentioned anywhere else.
On a different note, unfortunately, it feels that the documentation is written in a way where there is the assumption that readers are deeply familiar with how everything works and want to know more about what changed or specific topics, which is typically not the case.
You pass the options when you call app.use:
app.use(plugin, options) // Pass in the options here
These are then received by the install function of the plugin:
install(app, options) {
The passing of options is shown in multiple examples on that page, e.g. the first example and the i18n example. It's also mentioned in the text:
The install function receives the app instance along with additional options passed to
app.use(), if any
The passing of options is also mentioned in the API reference, in https://vuejs.org/api/application.html#app-use.
Based on your own experience of trying to understand the plugins guide, do you have any suggestions for how we might further clarify the explanation?
On a different note, unfortunately, it feels that the documentation is written in a way where there is the assumption that readers are deeply familiar with how everything works and want to know more about what changed or specific topics, which is typically not the case.
I'm not sure whether you're referring to the plugins page or the docs more generally. In general, the guides are written with the assumption that they will be read in order. The material builds from one guide to the next, so topics that have already been covered will be assumed knowledge in later guides.
Again, if you can provide specific examples of things that you felt weren't clear or made unreasonable assumptions about the knowledge of the reader then please let us know.
I'm going to close this.
It isn't clear what is being requested here, as the material does appear to be present in the existing documentation.