ERROR in [eslint] Failed to load plugin ‘import’ declared in ‘.eslintrc.js’: Cannot find module ‘eslint-plugin-import’
启动服务时报了这个错
原因
可能是因为下载了 http-server
插件,但启动配置没有做更改的原因
解决办法
将package.json
中的 webpack serve
改成 http-server dist
"scripts": {
"start": "npm run dev",
"dev": "http-server dist --config ./config/webpack.dev.js",
"build": "webpack --config ./config/webpack.prod.js"
},