I'm sharing my package.json
details below:
{
"name": "x",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "webpack --mode=development --watch",
"build": "webpack --mode=production"
},
"dependencies": {
"axios": "^0.21.0",
"vue-axios": "^3.2.0",
"vuex": "^3.6.2"
},
"devDependencies": {
"@types/node": "^14.14.37",
"css-loader": "^5.2.0",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^5.3.1",
"remove-files-webpack-plugin": "^1.1.3",
"sass": "^1.20.3",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"ts-loader": "^8.1.0",
"typescript": "^4.2.3",
"url-loader": "^4.1.1",
"vue": "^2.6.10",
"vue-loader": "^15.7.0",
"vue-template-compiler": "^2.6.10",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0"
}
}
Below is the configuration from my webpack.config.js file:
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
const RemovePlugin = require('remove-files-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const path = require('path');
// Some complex webpack config code here...
<p>An error occurred:</p>
<pre><code>[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.module.rules[4] should be one of these:
["..." | object { compiler?, dependency?, descriptionData?, enforce?, exclude?, generator?, include?, issuer?, issuerLayer?, layer?, loader?, mimetype?, oneOf?, options?, parser?, realResource?, resolve?, resource?, resourceFragment?, resourceQuery?, rules?, sideEffects?, test?, type?, use? }, ...]
-> A rule.
Details:
* configuration.module.rules[4].loader should be a non-empty string.
-> A loader request.
I recently updated dependencies, and now everything seems to have broken. I'm encountering an error message that I can't make sense of since the loader is indeed a string. Unfortunately, my knowledge about webpack is quite limited. Any help in resolving this issue would be greatly appreciated.