Installations
npm install @webpack-cli/serve
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
>=14.15.0
Typescript Support
Yes
Node Version
14.21.3
NPM Version
lerna/6.6.2/node@v14.21.3+x64 (linux)
Statistics
2,568 Stars
3,776 Commits
601 Forks
50 Watching
10 Branches
174 Contributors
Updated on 27 Nov 2024
Bundle Size
3.23 kB
Minified
1.50 kB
Minified + Gzipped
Languages
JavaScript (62.71%)
TypeScript (25.93%)
Smarty (11.28%)
CoffeeScript (0.05%)
SCSS (0.01%)
Dockerfile (0.01%)
Total Downloads
Cumulative downloads
Total Downloads
833,685,907
Last day
-2.6%
1,409,982
Compared to previous day
Last week
4.6%
7,443,961
Compared to previous week
Last month
16.6%
29,946,219
Compared to previous month
Last year
17.9%
301,429,976
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
webpack CLI
The official Command Line Interface of webpack
Table of Contents
- Introduction
- Supported arguments and commands
- Packages
- Getting started
- Exit codes and their meanings
- Contributing and Internal Documentation
- Funding
Introduction
Webpack CLI provides the interface of options webpack uses in its configuration file. The CLI options override options passed in the configuration file.
The CLI provides a rich set of commands that helps you develop your application faster.
How to install
If you have followed the Getting Started guide of webpack then webpack CLI is already installed!
Otherwise npm install --save-dev webpack-cli
, yarn add webpack-cli --dev
or pnpm add --D webpack-cli
will install it.
Supported arguments and commands
Get to know what are the available commands and arguments here.
Packages
We organize webpack CLI as a multi-package repository using lerna. The main CLI logic using options, resides in packages/webpack-cli
, while commands supported by the CLI, has dedicated subfolders in the folder packages
.
A summary of supported commands is described below.
Commands
Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks.
build|bundle|b [entries...] [options]
- Run webpack (default command, can be omitted).configtest|t [config-path]
- Validate a webpack configuration.help|h [command] [option]
- Display help for commands and options.init|create|new|c|n [generation-path] [options]
- Create a new webpack project.info|i [options]
- Returns information related to the local environment.plugin|p [output-path] [options]
- Initiate new plugin project.loader|l [output-path] [options]
- Initiate new loader project.serve|server|s [entries...] [options]
- Use webpack with a development server that provides live reloading.version|v [commands...]
- Output the version number ofwebpack
,webpack-cli
,webpack-dev-server
, and commands.watch|w [entries...] [options]
- Run webpack and watch for files changes.
Getting started
If 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 you want to create a fresh webpack project, the init
command will guide you through setting up a project. Run the command as stated below.
1npm i webpack-cli @webpack-cli/init
1npx webpack-cli init
You will then be prompted for some questions about which features you want to use, such as scss
, typescript
, PWA
support or other features.
Exit codes and their meanings
Exit Code | Description |
---|---|
0 | Success |
1 | Errors from webpack |
2 | Configuration/options problem or an internal error |
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 contribution documentation.
Funding
If you like webpack, please consider donating through Open Collective to help us keep the project relevant.
Code of Conduct
Guidelines to how the webpack organization expects you to behave is documented under Code of Conduct
No vulnerabilities found.
Reason
30 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
1 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
Reason
Found 1/2 approved changesets -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:5
- Info: topLevel 'contents' permission set to 'read': .github/workflows/nodejs.yml:18
- Warn: no topLevel permission defined: .github/workflows/update-docs.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependency-review.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/dependency-review.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dependency-review.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/dependency-review.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/nodejs.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:153: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:157: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-docs.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/update-docs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-docs.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/update-docs.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/update-docs.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/webpack/webpack-cli/update-docs.yml/master?enable=pin
- Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:1: pin your Docker image by updating node:lts to node:lts@sha256:5c76d05034644fa8ecc9c2aa84e0a83cd981d0ef13af5455b87b9adf5b216561
- Warn: npmCommand not pinned by hash: .devcontainer/Dockerfile:4
- Info: 0 out of 12 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 3 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 containerImage dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
5.9
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More