I'm the author of the webpack-remove-empty-scripts that you use in Webpack.
I will demonstrate the new pug-plugin how much easy to compile Pug templates using pug-plugin than with "old way" using the html-webpack-plugin, pug-loader, etc.
Just one Pug plugin replaces the functionality of many plugins and loaders used with Pug:
Hello,
I'm the author of the
webpack-remove-empty-scripts
that you use in Webpack. I will demonstrate the new pug-plugin how much easy to compile Pug templates usingpug-plugin
than with "old way" using thehtml-webpack-plugin
,pug-loader
, etc.Just one Pug plugin replaces the functionality of many plugins and loaders used with Pug:
Using the pug-plugin:
Specify the Pug files in the Webpack entry:
Add source scripts and styles directly to Pug using require():
Generated HTML contains hashed CSS and JS output filenames:
You can try it yourself the demo-pug-plugin branch.
Note: use please the
npm
instead of yarn:Start local development in Browser with HMR and live reload:
Build production:
P.S.: please, see my comments in the code.