Static GitHub Issues

[2542] Plugin not found in v1.0.0

prev: Underscores are not considered when building URLs
next: From Webpack to Parcel

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)/
        })
      }
    }
  }
}
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2210">#c2210</a>)</em></sub></div>