Socket
Socket
Sign inDemoInstall

webpack-cli

Package Overview
Dependencies
567
Maintainers
2
Versions
123
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    webpack-cli

CLI for webpack & friends


Version published
Weekly downloads
7.1M
decreased by-0.2%
Maintainers
2
Install size
72.2 MB
Created
Weekly downloads
 

Package description

What is webpack-cli?

The webpack-cli npm package provides a command-line interface for the webpack bundler, which allows developers to interact with webpack and its features directly from the command line. It enables tasks such as creating a new webpack project, managing configurations, running the development server, and more.

What are webpack-cli's main functionalities?

Initializing a new webpack project

This command sets up a new webpack project by generating a default configuration file. It can also install webpack and related dependencies if they are not already installed.

webpack-cli init

Generating a configuration file

Generates a webpack configuration file based on the user's preferences. It can be used to quickly scaffold a new configuration or to update an existing one.

webpack-cli generate

Running a webpack build

Executes the webpack build process, which bundles the source files according to the webpack configuration. This is typically used for production builds.

webpack-cli build

Starting a development server

Starts the webpack development server, which provides a live reloading environment for development purposes. It watches for file changes and automatically recompiles the project.

webpack-cli serve

Running webpack in watch mode

Runs webpack in watch mode, where it watches for file changes and recompiles the project as necessary. This is useful during development to see changes reflected immediately.

webpack-cli watch

Other packages similar to webpack-cli

Readme

Source

Build Status Dependency Status Code Climate chat on gitter

Webpack CLI

Webpack CLI encapsulates all code related to CLI handling. It captures options and sends them to webpack compiler. You can also find functionality for initializing a project and migrating between versions. For the time being, it is backwards-compatible with the CLI included in webpack itself.

Note The package is still in work in progress. In case you want to contribute, reach to us, so we can point you out how and when you can help us.

Migration from webpack v1 to v2

The migrate feature eases the transition from version 1 to version 2. migrate also allows users to switch to the new version of webpack without having to extensively refactor.

webpack-cli --migrate <config>

Read more about migrating

Creating new webpack projects

The init feature allows users to get started with webpack, fast. Through scaffolding, people can create their own configuration in order to faster initialize new projects for various of use cases.

webpack-cli --init [webpack-addons-<package>]

Read more about scaffolding

FAQs

Last updated on 07 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc