webpack packaging has been configured with vue-loader, but still reported an error when packaging
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" },
]
}
]
}
};
error report:
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": ""
}