简体   繁体   中英

Cannot read property 'compilation' of undefined

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')

需要sass lint插件

and

new SassLintPlugin()

将sass lint插件连接到webpack配置文件

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

将sass lint插件添加到webpack配置文件后出现未捕获的错误

Any ideas how to resolve it?

因此,在使用npm安装时,您需要安装指定版本的插件:

npm install --save-dev uglifyjs-webpack-plugin@1

插件已过时,请改用https://github.com/swordray/sass-lint-webpack ,它是最新的webpack基础结构。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM