How to use the minimist.mode function in minimist

To help you get started, we’ve selected a few minimist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github massyao / china-invalid-vaccine-flow / webpack.config.js View on Github external
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,