ascendancyy / vue-cli-plugin-stylelint

Vue cli 3.x plugin for stylelint
46 stars 15 forks source link

Doesn't work with latest cli #10

Open faboweb opened 5 years ago

faboweb commented 5 years ago
> vue-cli-service serve

 ERROR  TypeError: Cannot destructure property `pluginOptions` of 'undefined' or 'null'.
TypeError: Cannot destructure property `pluginOptions` of 'undefined' or 'null'.
    at module.exports (C:\Users\Fabo\Documents\Entwicklung\lunie\node_modules\@ascendancyy\vue-cli-plugin-stylelint\index.js:7:66)
    at plugins.forEach (C:\Users\Fabo\Documents\Entwicklung\lunie\node_modules\@vue\cli-service\lib\Service.js:80:7)
    at Array.forEach (<anonymous>)
    at Service.init (C:\Users\Fabo\Documents\Entwicklung\lunie\node_modules\@vue\cli-service\lib\Service.js:79:18)
    at Service.run (C:\Users\Fabo\Documents\Entwicklung\lunie\node_modules\@vue\cli-service\lib\Service.js:206:10)
    at Object.<anonymous> (C:\Users\Fabo\Documents\Entwicklung\lunie\node_modules\@vue\cli-service\bin\vue-cli-service.js:36:9)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
PMK commented 5 years ago

Add the following to your package.json to fix this issue:

"vue": {
    "pluginOptions": {
      "lintStyleOnBuild": false,
      "stylelint": {}
    }
}
RubenSibon commented 4 years ago

Yes, that did the trick, but if you use vue.config.js add it there of course.