# webpack

* Alias: `wp`
* For development use `mhy wp serve`

## Default command

```bash
webpack --config mhy/configs/webpack
```

## CLI Options

<https://webpack.js.org/api/cli/>

## Examples

### Default CLI

```bash
mhy webpack
# or
mhy wp
# or dev server
mhy wp serve
```

### In `production` mode

```bash
mhy webpack --mhy-env=prod
# or
NODE_ENV=production mhy webpack
```

### With watcher

```bash
mhy webpack -w
# or
mhy wp --watch
```

## Debug performance

`SpeedMeasurePlugin` is being supported out-of-the-box which is giving statistics for you about the time being spent on different stages of the build process to make it easier to track down build performance issues.

### Usage

You just need to pass the `--mhy-debug` flag to your command.

```
mhy wp --mhy-debug
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mhy.js.org/tools/processes/webpack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
