liuxiaodeMacBook-Pro:vue liuxiao$ npm i webpack vue vue-loader
npm ERR! Darwin 17.4.0
npm ERR! argv "/Users/liuxiao/.nvm/versions/node/v6.9.2/bin/node" "/Users/liuxiao/.nvm/versions/node/v6.9.2/bin/npm" "i" "webpack" "vue" "vue-loader"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ENOSELF
npm ERR! Darwin 17.4.0
npm ERR! argv "/Users/liuxiao/.nvm/versions/node/v6.9.2/bin/node" "/Users/liuxiao/.nvm/versions/node/v6.9.2/bin/npm" "i" "webpack" "vue" "vue-loader"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ENOSELF
2018-09-11
最赞回答 / fallen_down
我找到了答案,分享给大家。只要修改webpack.config.js就可以打包了。const path = require('path'); const {VueLoaderPlugin}=require('vue-loader'); module.exports = { entry: path.resolve(__dirname, "src/index.js"), //webpack4官方绝对路径 devServer: { contentBase: '...
2018-09-07
已采纳回答 / 悟空86372
你没有写“const VueLoaderPlugin = require('vue-loader/lib/plugin')”吧第二个错误应该是你没有加{test: /\.css$/,use: ['style-loader','css-loader']},
2018-09-07