const HtmlWebpackPlugin = require('html-webpack-plugin'); //installed via npm code example
Example 1: html webpack plugin
npm install html-webpack-plugin --save-dev
Example 2: html-webpack-plugin npm
npm i --save-dev html-webpack-plugin
npm install html-webpack-plugin --save-dev
npm i --save-dev html-webpack-plugin