Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const argv = require('minimist')(process.argv.slice(2)).mode;
const Config = {
buildDir: path.resolve(__dirname, "build"),
};
module.exports = () => {
return {
entry: {
index1: "./index.js",
},
output: {
filename: "js/[name].[hash].js",
path: Config.buildDir,
},
devServer: {
disableHostCheck: true,
compress: true,