Plugin not found in v1.0.0
[issue link]When I’m trying to add element-ui as a plugin in v1.0.0 it returns this error:
ERROR Failed to compile with 1 errors 18:11:42
This dependency was not found:
* nuxt_plugin_elementui_f0473354 in ./.nuxt/index.js
I’m using the same way of adding a plugin in another project on Nuxt v1.0.0-rc11 and here it works as expected.
This is what my plugin and config looks like.
~/plugins/element-ui.js
import Vue from 'vue'
import ElementUI from 'element-ui'
import elementLocale from 'element-ui/lib/locale/lang/en'
Vue.use(ElementUI, { locale: elementLocale })
nuxt.config.js
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'myfreight',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'MyFreight website' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
css: [
'~assets/css/reset.sass',
'~assets/css/elements-ui.scss',
'~assets/css/typography.sass',
],
/*
** Customize the progress bar color
*/
loading: false,
plugins: [
{ src: '~/plugins/element-ui', ssr: true }
],
/*
** Build configuration
*/
build: {
vendor: ['element-ui'],
/*
** Run ESLint on save
*/
extend (config, { isDev, isClient }) {
if (isDev && isClient) {
config.module.rules.push({
enforce: 'pre',
test: /\.(js|vue)$/,
loader: 'eslint-loader',
exclude: /(node_modules)/
})
}
}
}
}