Closed alexandr-kazakov closed 2 years ago
Hi @alexandr-kazakov,
Don't use the Pug plugin together with html-webpack-plugin
and mini-css-extract-plugin
.
Just one Pug plugin replaces the functionality of both html-webpack-plugin
and mini-css-extract-plugin
to make usage of Pug much easy.
Please, see correct use examples of pug-plugin.
In your use case of the Webpack config should be used the @webdiscus/pug-loader instead of the pug-plugin
.
Add the exact version 2.8.2
of @webdiscus/pug-loader
supported node 12
in package.json:
"devDependencies": {
"@webdiscus/pug-loader": "2.8.2"
}
In Webpack module rule change the Pug loader:
{
test: /\.pug$/,
loader: '@webdiscus/pug-loader',
exclude: /(node_modules)/,
},
You can find last version supported node 12:
v2.9.3
v2.8.2
On node v16.x it’s working fine, but I need 12.x.
My webpack.config.js: