HtmlWebpackPlugin

HtmlWebpackPlugin simplifies the creation of HTML files to serve the bundle. This is especially useful for bundles that include a hash in the filename, which changes every compilation.

When using this method, we have three choices—use a template with lodash templates, use your loader, or let the plugin generate an HTML file. The template is simply an HTML template that you can automatically load using lodash for speed. The loader or the plugin can generate its HTML file. This all speeds up any automated processes.

When using multiple entry points, they will be included with the <script> tags in the generated HTML.

If you have any CSS assets in Webpack's output, then these will be included with the <link> tags in the <head> element of the generated HTML. An example would be if CSS is extracted with MiniCssExtractPlugin.

Back to working with chunks. The next plugin to look at is a plugin that deals with limiting the chunk count.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.233.41