Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
/* eslint-disable no-console, no-magic-numbers, max-statements */
/* eslint-disable max-params, prefer-template, complexity, global-require */
const Path = require("path");
const Fs = require("fs");
const webpack = require("webpack");
const hotHelpers = require("webpack-hot-middleware/helpers");
const Url = require("url");
const { getWebpackStartConfig } = require("../../config/webpack/util/custom-check");
const { getLogs, getLogEventAsHtml } = require("./log-reader");
hotHelpers.pathMatch = (url, path) => {
try {
return Url.parse(url).pathname === Url.parse(path).pathname;
} catch (e) {
return false;
}
};
const webpackDevMiddleware = require("webpack-dev-middleware");
const webpackHotMiddleware = require("webpack-hot-middleware");
const serveIndex = require("serve-index-fs");
const ck = require("chalker");
const archetype = require("electrode-archetype-react-app/config/archetype");
const _ = require("lodash");
const statsUtils = require("../stats-utils");
const statsMapper = require("../stats-mapper");
const devRequire = archetype.devRequire;