ERROR Invalid options in vue.config.js: “plugins“ is not allowed

Problem Description:

When importing jQuery, if index. JS is not found, it is directly added to Vue. Config. JS , and the following error occurs

Reason: unknown


Add configurewebpack to the outer layer

const path = require('path')

var webpack = require('webpack')

function resolve(dir) {
    return path.join(__dirname, dir)
module.exports = {
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                "windows.jQuery": "jquery"

Read More: