How to install the plug-in Nuxt.js?

Can't understand what the problem is.
All done on the docks
Himself plugin

1. The plugins folder
import Vue from 'vue'
import Vuetify from 'vuetify'
Vue.use(Vuetify)


2. Config nuxt.config.js
module.exports = {
 build: {
 vendor: ['vuetify']
},
 plugins: [

'~plugins/vuetify'
]
}

3. The application file Index.vue
<template>
 <div class="container">
 <v-alert success>Work fuck!</v-alert>
</div>
</template>

the <script>
import Vue from 'vue'
import Vuetify from 'vuetify'
Vue.use(Vuetify)

export default {
 mounted () {
vuetify.init()
}
}
</script>


It may need to initialize the file apps? At the docks installed it globally and about the initialization of the word.
Thank you.
August 23rd 19 at 10:31
2 answers
August 23rd 19 at 10:33
Solution
The Lord, he found the answer after killing 3 days)
1. Vuetify not supported in Nuxt.js
2. Supported ElementUI

Instruction how to install:
3.0) npm install element-ui-S

3.1) nuxt.config.js
module.exports = {
 plugins: ['~plugins/element-ui.js'],


3.2) ~plugins/ekement-ui.js
import Vue from 'vue'

const ElementUI = require('element-ui')
const locale = require('element-ui/lib/locale/lang/ru-ru')
Vue.use(ElementUI, {local)} // if insert global, nothing changes until I do not understand why so


3.3 ~pages/index.vue
<template>
the <div>
<el-row>
 <el-col :span="24">
 <el-button>Default Button</el-button>
 <el-button type="primary">Primary Button</el-button>
 <el-button type="text">Button Text</el-button>
</el-col>
</el-row>
<el-row>
 <el-col :span="24">
 <el-input-number v-model="num1" :min="1" max="10"></el-input-number>
</el-col>
</el-row>
</div>
</template>

the <script>
export default {
 layout: 'teub',
 data() {
 return {
 num1: 1
}
}
}
</script>

<style>
body {
 font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
 padding-top: 50px;
}

.el-row {
 padding: 10px;
 text-align: center;
}
</style>
At the moment, Vuetify works fine on nuxt - Brant_Kunze66 commented on August 23rd 19 at 10:36
Moreover, almost officially recommended :) But it should be used fully, there is no possibility to use components. - gordon_Zbonc commented on August 23rd 19 at 10:39
August 23rd 19 at 10:35
To enable this plugin, it is necessary

1. Create a file under the connection in the folder plugins/
2. To connect the plugin file in nuxt.config.js

p.s. use the connection in design
if (!Vue.prototype.plugin) {
Vue.use(plugin)
}


Connection nuxt.config.js
module.exports = {
 plugins: [
'~plugins/validator.js',
'~plugins/lodash.js'
]
... other settings
}


Example of connecting third-party libraries adapted to the vue :

import Vue from 'vue'
import lodash from 'lodash'
import VueLodash from 'vue-lodash/dist/vue-lodash.min'
if (!Vue.prototype._) {
 Vue.use(VueLodash, lodash)
}


Connection example your plugin:
import _ from 'lodash'
import Vue from 'vue'

export const validator = (Vue) => {
 Vue.validator = {
 applyErrors: {
 inputs (inputs, errors = {}) {
 _.forEach(inputs, (input) => {
 input.error = "
 if (errors[input.name]) {
 input.error = errors[input.name][0]
}
})
 return inputs
}
}
}
 // Plugin to call from any point of Vue object in the context of this
 if (!Vue.prototype.$validator) {
 Object.defineProperties(Vue.prototype, {
 $validator: {
 get: () => {
 return Vue.validator
}
}
})
}
}

Vue.use(validator)

Find more questions by tags JavaScript