vuetifyjs / nuxt

Nuxt.js + Vuetify.js starter project template.
MIT License
306 stars 109 forks source link

Fix: eslint error after migrating to Nuxt v2 #56

Closed Codefa closed 5 years ago

Codefa commented 5 years ago

error :

Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: Cannot read property 'eslint' of undefined
at Object.module.exports (/Users/fbernard/tmp/test/node_modules/eslint-loader/index.js:148:18) 

isClient & isServer are Deprecated

after running npm run if you are using A-la-carte in your template you may face this error about stylus

node_modules/vuetify/src/stylus/components/_app.styl:1 ({"Object.":function(module,exports,require,dirname,filename,global,jest){@import '../bootstrap'

~~to fix it go to node_modules/vuetify/src/stylus/components there open _app.styl remove the line no:1 @import '../bootstrap'~~ I dont have a fix for it now :-(

@johnleider Please take a look at this

XanderLuciano commented 5 years ago

I believe you are just missing one line in your nuxt.config.js js under the build configuration:

  build: {
    transpile: [/^vuetify/],
    babel: {
      plugins: [
        ['transform-imports', {
          'vuetify': {
            'transform': 'vuetify/es5/components/${member}',
            'preventFullImport': true
          }
        }]
      ]
    },

Specifically, transpile: [/^vuetify/],

I opened PR #60 to address and resolve this issue. :)

Codefa commented 5 years ago

I believe you are just missing one line in your nuxt.config.js js under the build configuration:

  build: {
    transpile: [/^vuetify/],
    babel: {
      plugins: [
        ['transform-imports', {
          'vuetify': {
            'transform': 'vuetify/es5/components/${member}',
            'preventFullImport': true
          }
        }]
      ]
    },

Specifically, transpile: [/^vuetify/],

I opened PR #60 to address and resolve this issue. :)

I saw that PR great work i Used traspile inside the build but got some erors may be I Messed Up the code , anyway I'm gonna close this PR now @XanderLuciano New PR is more accurate and Problem solving #60