const webpack = require("webpack"); const path = require("path"); const UglifyJSPlugin = require("uglifyjs-webpack-plugin"); let config = { entry: "./src/index.js", output: { path: path.resolve(__dirname, "./public"), filename: "./bundle.js" }, devServer: { contentBase: path.resolve(__dirname, "./public"), historyApiFallback: true, inline: true, open: true, hot: true }, plugins: [ new UglifyJSPlugin(), new webpack.SourceMapDevToolPlugin({}) ], devtool: "eval-source-map" } module.exports = config;