vue-loader不好使,npm run build報錯
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.




不知道怎么解決了,請大家?guī)蛶兔?,老師在么?/p>
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.




不知道怎么解決了,請大家?guī)蛶兔?,老師在么?/p>
2018-05-22
舉報
2018-08-08
const?path?=?require('path') const?VueLoaderPlugin?=?require('vue-loader/lib/plugin'); module.exports={ ????entry:path.join(__dirname,'src/index.js'), ????output:?{ ????????filename:?"bundle.js", ????????path:?path.join(__dirname,'dist') ????}, ????module:?{ ????????rules:?[ ????????????{ ????????????????test:/.vue$/, ????????????????loader:?"vue-loader" ????????????}, ????????????{ ????????????????test:/.css$/, ????????????????use:[ ????????????????????'style-loader', ????????????????????'css-loader' ????????????????] ????????????} ????????] ????}, ????plugins:?[ ????????//?make?sure?to?include?the?plugin?for?the?magic ????????new?VueLoaderPlugin() ????] }webpack.config.js? 如以上寫法,記得下載style-loader、css-loader
2018-05-24
由于webpack4版本問題需要修改webpack.config.js配置
2018-05-22
emmm 雖然我沒遇到這錯 但是看了一下你的代碼 vueloader的版本忒新了 搜了一下你的錯誤 這個鏈接里有一個解決辦法 你可以試一下 :http://idcbgp.cn/article/details/id/29655
說是最新的vueloader需要在config.js里去設(shè)置一下它?
另附一下我的package.json里的dependencies:
"dependencies": {
"cross-env": "^5.1.3",
"css-loader": "^0.28.7",
"file-loader": "^1.1.6",
"html-webpack-plugin": "^2.30.1",
"style-loader": "^0.19.1",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"url-loader": "^0.6.2",
"vue": "^2.5.13",
"vue-loader": "^13.6.0",
"vue-template-compiler": "^2.5.13",
"webpack-dev-server": "^2.11.2"
},
"devDependencies": {
"webpack": "^3.10.0"
}
希望能幫到你·········