I am setting webpack but I have an error. It happens when I try to use html-loader, what I do when I set rules in the module in webpack.config.js file. It says there is an error in child compilation. I am trying to understand why.
Here is the error :
ERROR in child compilations (Use 'stats.children: true' resp.'--
stats-children' for more details)
Here is the code (thank you for your help) :
module.exports = {
mode: "development",
entry: path.resolve(__dirname, './src/index.js'),
output: {
path: path.resolve(__dirname, './dist'),
filename: 'main.js',
},
module: {
rules: [
{
test: /\.html$/i,
use: [
{
loader: "html-loader",
options:{
minimize: true,
},
},
],
},
],
},
plugins: [new HtmlWebpackPlugin({
template: path.resolve(__dirname, './src/index.html'),
filename: "index.html",
})],
};