79520762

Date: 2025-03-19 16:13:17
Score: 0.5
Natty:
Report link

My webpack.config.js

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const webpack = require('webpack');

module.exports = {
  mode: 'development',
  devtool: 'source-map' ,
  context: path.resolve(__dirname, ''),
  entry: './src/camera.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js',
    clean:true,
  },
  devServer: {
    static: path.resolve(__dirname, ''),
    port: 3000,
    open: true,
    hot: true,
    //compress: true,
    historyApiFallback: true
  },
  plugins: 
  [
    new HtmlWebpackPlugin({
      template: './html/camera.html',
    }),
    new CleanWebpackPlugin(),
  ],
};
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Руслан Шигимага