The prompt after running webpack is as follows

prompt after running with webpack-- config build/webpack.base.conf.js command:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.module has an unknown property "rule". These properties are valid:
   object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, noParse?, rules?, defaultRules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
   -> Options affecting the normal modules (`NormalModuleFactory`).

my webpack.base.conf.js is as follows:

"use strict";

const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
    entry: {
        index: [
            path.resolve(__dirname,"../src/main.js")
        ]
    },
    output: {
        path: path.resolve(__dirname,"../dist/static"),
        filename: "[name].[hash:8].js",
        publicPath: "static/"
    },
    module: {
        rule: [
            {
                test: /\.vue$/,
                loader: "vue-loader"
            },
            {
                test: /\.js$/,
                loader: "babel-loader?presets=es2015",
                exclude: /node_modules/
            }
        ]
    },
    resolve: {
        extensions: [".js",".vue"],
        alias: {
            "vue$":"vue/dist/vue.esm.js"
        }
    },
    plugins: [
        new HtmlWebpackPlugin({
            filename: "../index.html",
            template: path.resolve(__dirname,"../index.html")
        })
    ]
}

clipboard.png
looking at the error does not seem to be a path problem. For the first time, you don"t need vue-cli, to build the project structure step by step. If you make this mistake, you really don"t understand

.
Apr.05,2021

the configuration parameters of different versions of webpack are different. This is where your problem lies


rules instead of rule,webpack starts to check whether all your key is legal


is rules or rule

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4670e-44bad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4670e-44bad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?