entry: './src/index.js',
                  
                  
                    output: {
                  
                  
                      path: path.resolve(__dirname, 'dist'),
                  
                  
                      filename: 'bundle.js',
                  
                  
                      assetModuleFilename: 'images/[hash][ext][query]',
                  
                  
                      clean: true,
                  
                  
                    },
                  
                  
                    plugins: [
                  
                  
                      new HtmlWebpackPlugin({
                  
                  
                        template: './src/index.html'
                  
                  
                      })
                  
                  
                    ],
                  
                  
                    module: {
                  
                  
                      rules: [
                  
                  
                        {
                  
                  
                          test: /\.(?:ico|png|jpg|jpeg|svg)$/i,
                  
                  
                          type: 'asset/resourse'
                  
                  
                        },
                  
                  
                        {
                  
                  
                          test: /\.html$/i,
                  
                  
                          loader: "html-loader"
                  
                  
                        }
                  
                  
                      ]
                  
                  
                    }
                  
                  
                  };
                  
                  
                
вебпак какой версии?
Обсуждают сегодня