1

I`ve got uncaught error, after connecting sass-lint-webpack to webpack.config.dev.js from Create React App

Simply add this to webpack.config.dev.js:

const SassLintPlugin = require('sass-lint-webpack')

require sass lint plugin

and

new SassLintPlugin()

connect sass lint plugin to webpack config file

and then after run yarn start - I've got the error: "Cannot read property 'compilation' of undefined"

uncaught error after add sass lint plugin to webpack config file

Any ideas how to resolve it?

north.inhale
  • 483
  • 2
  • 9
  • 20

2 Answers2

1

So you’ll need to install the plugin specifying the version when installation with npm :

npm install --save-dev uglifyjs-webpack-plugin@1
Andronicus
  • 25,419
  • 17
  • 47
  • 88
0

Plugin outdated, use https://github.com/swordray/sass-lint-webpack instead, it is up to date with new webpack infrastructure.

PlayMa256
  • 6,603
  • 2
  • 34
  • 54
  • Thank you for turning your attention, I was wrong in writing the question, pointing out the wrong githab plug-in. I pointed **sasslint-webpack-plugin** instead actually use **sass-lint-webpack** Screenshot: https://s.mail.ru/DAxs/o8yn9wEyr – north.inhale Aug 27 '18 at 09:17
  • Anyway, I found a new plugin: **stylelint-webpack-plugin** and I'll try to install it now – north.inhale Aug 27 '18 at 09:20
  • Now I understand why someone put me a minus - because of my mistake, I pointed abandoned plugin in my question – north.inhale Aug 27 '18 at 09:23