Skip to content
Webpack's Command Line Interface
TypeScript JavaScript Smarty HTML
Branch: next
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: add some comments Jun 6, 2019
build/changelog-generator chore: readd deps and fix linting Jul 14, 2019
docs chore: readd deps and fix linting Jul 14, 2019
lib tests: fix output test and code Aug 18, 2019
packages Merge pull request #1047 from webpack/tests/entries Aug 18, 2019
test tests: fix output test and code Aug 18, 2019
.babelrc fix(tests): update jest Mar 10, 2019
.codecov.yml chore(packager): remove yarn (#302) Mar 2, 2018
.cz-config.js tests: add tests for version, improve conventions (#1026) Aug 16, 2019
.editorconfig chore: readd deps and fix linting Jul 14, 2019
.eslintignore chore: readd deps and fix linting Jul 14, 2019
.eslintrc.js misc: fix infra & add failing test Aug 18, 2019
.fitcommitjsrc.json feat: Add commit validation and commits template Dec 16, 2016
.gitattributes chore(ci): Set up CI with Azure Pipelines Sep 14, 2018
.gitignore chore(ts): enables source map in the ts (#961) Jun 19, 2019
.npmignore chore(ci): add commitlint when trying to commit (#595) Sep 18, 2018
.prettierrc chore: readd deps and fix linting Jul 14, 2019
.travis.yml chore(ci): add node 12 (#872) May 22, 2019
CHANGELOG.md chore: v3.3.5 Jun 23, 2019
CODEOWNERS feat: add codeowners file Aug 4, 2019
CODE_OF_CONDUCT.md feat(md): formats md before committing (#851) May 24, 2019
INIT.md chore: merge against master May 30, 2019
LICENSE Project Initialize Dec 15, 2016
MIGRATE.md fix: reset files Mar 16, 2019
README.md Merge pull request #1027 from jamesgeorge007/feat/update-docs Aug 16, 2019
SECURITY.md Merge branch 'master' of https://github.com/webpack/webpack-cli into … May 30, 2019
azure-pipelines-template.yml chore(packages): lock dependencies versions (#958) Jun 15, 2019
azure-pipelines.yml tests: azure pipelines Feb 5, 2019
cli.js fix: extend notify period Aug 13, 2019
commitlint.config.js chore: readd deps and fix linting Jul 14, 2019
lerna.json chore: lerna independent Jun 7, 2019
open-bot.yml misc(grammar): revise spelling and incorrect syntax (#293) Mar 2, 2018
package-lock.json chore: rebase Aug 18, 2019
package.json chore: rebase Aug 18, 2019
tsconfig.base.json chore(ts): enables source map in the ts (#961) Jun 19, 2019
tsconfig.json tests(migration): typescript (#613) Mar 16, 2019
tsconfig.packages.json Remove tslint in favour of eslint (#834) Apr 20, 2019
typedoc.js chore: readd deps and fix linting Jul 14, 2019

README.md

webpack CLI

The official CLI of webpack


npm Build Status Build2 Status deps Code Climate chat on gitter Install Size Downloads lerna GitHub contributors Issue resolution PR's welcome

About

webpack CLI provides a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file, but often developers want to create a more custom webpack configuration based on their use-cases and needs. webpack CLI addresses these needs by providing a set of tools to improve the setup of custom webpack configuration.

How to install

When you have followed the Getting Started guide of webpack then webpack CLI is already installed!

Otherwise npm install --save-dev webpack-cli or yarn add webpack-cli --dev will install it.

Packages

We organize webpack CLI as a multi-package repository using lerna. Every command has a dedicated subfolder in the packages Folder. Here's a summary of commands provided by the CLI.

Commands

Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks.

Removed commands since v3.3.3

  • webpack-cli add - Add new properties to a webpack configuration file.
  • webpack-cli remove - Remove properties from a webpack configuration file.
  • webpack-cli update - Update properties in a webpack configuration file.

Utilities

The project also has several utility packages which are used by other commands

  • utils - Several utilities used across webpack-cli.
  • generators - Contains all webpack-cli related yeoman generators.
  • webpack-scaffold - Utilities to create a webpack scaffold.

Getting started

When you have followed the Getting Started guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the init command to create a new webpack.config.js configuration file:

npm i webpack-cli @webpack-cli/init
npx webpack-cli init

You will be prompted for some questions about what how you want to generate your config file when running the init command so webpack CLI can provide the best fitting configuration.

webpack CLI Scaffolds

With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack, we want to allow this. We provide webpack-scaffold as a utility suite for creating these scaffolds. It contains functions that could be of use for creating a scaffold yourself.

You can read more about Scaffolding, learn How to compose a webpack-scaffold? or generate one with webpack-scaffold-starter.

Contributing and Internal Documentation

The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our documentation on contributing.

Open Collective

If you like webpack, please consider donating to our Open Collective to help us maintain it.

You can’t perform that action at this time.