Multiple Script Bundles in a Layout in Webpack

If we get several bundles as a result of the build, Webpack will include each of them. Let's check. Let's say we have the following settings:

webpack.config.jsexport default {
  context: path.resolve( 'src'),
  entry: {
    test1: './test1.js',
    test2: './test2.js'
  },
  output: {
    filename: '[name].build.js',
    path: path.resolve('dist'),
  },
  plugins: [
    new HtmlWebpackPlugin(),
  ],
};

After assembly, both of our bundles will be connected to the layout file:

dist/index.html<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Webpack App</title>
    
    <script defer src="test1.build.js"></script>
    <script defer src="test2.build.js"></script>
  </head>
  <body>
    
  </body>
</html>
Задание 1

Make three entry points. Build. Examine the layout file and make sure all your bundles are included.