Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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',