How to use the webpack-cli/bin/utils/constants.GROUPS function in webpack-cli

To help you get started, we’ve selected a few webpack-cli 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 kotarella1110 / cordova-plugin-webpack / src / options / webpack.ts View on Github external
// https://github.com/webpack/webpack-cli/blob/v3.3.9/bin/config/config-yargs.js
import supportsColor from 'supports-color';
import constants from 'webpack-cli/bin/utils/constants';

const {
  CONFIG_GROUP,
  BASIC_GROUP,
  MODULE_GROUP,
  OUTPUT_GROUP,
  ADVANCED_GROUP,
  RESOLVE_GROUP,
  OPTIMIZE_GROUP,
  DISPLAY_GROUP,
} = constants.GROUPS;

const options = {
  config: {
    type: 'string' as const,
    describe: 'Path to the config file',
    group: CONFIG_GROUP,
    defaultDescription: 'webpack.config.js or webpackfile.js',
    requiresArg: true,
  },
  'config-register': {
    type: 'array' as const,
    alias: 'r',
    describe:
      'Preload one or more modules before loading the webpack configuration',
    group: CONFIG_GROUP,
    defaultDescription: 'module id or path',

webpack-cli

CLI for webpack & friends

MIT
Latest version published 1 year ago

Package Health Score

93 / 100
Full package analysis