Files
ExpressJS-Mongo/frontend/webpack.config.js

24 lines
631 B
JavaScript

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