在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML/ webpack打包已配置vue-loader打包時(shí)仍報(bào)錯(cuò)You may need

webpack打包已配置vue-loader打包時(shí)仍報(bào)錯(cuò)You may need an appropriate loader.

webpack打包已配置了vue-loader但打包時(shí)仍報(bào)錯(cuò)

webpack.config.js

const path = require('path');

module.exports = {
    entry: __dirname+"/app/index.js",
    output: {
        path: __dirname+"/build",
        filename: "bundle.js"
    },module: {
        rules: [
        {
            test: /\.vue$/,
            use: [
                { loader: 'vue-loader' },
            ]
        }
        ]
    }
};

報(bào)錯(cuò):

clipboard.png

package.json

{
  "name": "todolist",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "webpack --config webpack.config.js"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "css-loader": "^0.28.11",
    "vue": "^2.5.16",
    "vue-loader": "^14.2.2",
    "vue-template-compiler": "^2.5.16",
    "webpack": "^4.5.0"
  },
  "dependencies": {},
  "description": ""
}
回答
編輯回答
任她鬧

你這是解析JS文件的 babel-loader 沒(méi)有配置的報(bào)錯(cuò)信息 ,

你只配置了一個(gè) vue-loader。

2018年4月17日 05:48
編輯回答
兔寶寶
new Vue({});還有增加個(gè)rule,解析js的
2018年4月7日 00:49