API: The plugins Property
- Type:
Array
If the item is an object, the properties are:
- src: (path of the file)
- mode:
String
(can beclient
orserver
) If defined, the file will be included only on the respective (client or server) side.
Note: Old version
If the item is an object, the properties are:
- src:
String
(path of the file)
Example (nuxt.config.js
):
UI framework example (nuxt.config.js
):
This refers to a file in plugins/ant-design-vue.js
:
All the paths defined in the plugins
property will be imported before initializing the main application.
Every time you need to use Vue.use()
, you should create a file in plugins/
and add its path to plugins
in nuxt.config.js
.
To learn more how to use the plugins, see the guide documentation.