mhy
  • Introduction
  • Basics
    • Installation
    • Usage
    • UI
    • Ecosystem
    • How does it work?
  • Tools
    • Built-ins
      • boot
      • config
      • dep
      • options
      • ui
    • Processes
      • eslint
      • jest
      • node
      • nodemon
      • prettier
      • standard-version
      • storybook-start
      • storybook-build
      • tsc
      • webpack
      • webpack-bundle-analyzer
      • webpack-dev-server
    • Configs
      • eslint
      • gitignore
      • jest
      • manifest
      • mhy
      • npmignore
      • prettier
      • storybook
      • typescript
      • webpack
  • IDE setup
    • WebStorm & PHPStorm
    • VSCode
  • Recipes and Examples
    • package.json overrides
    • Add your own
  • Others
    • FAQ
    • Help
    • Development of mhy
    • Suggest a library
Powered by GitBook
On this page
  • Default command
  • CLI Options
  • Examples
  • Default CLI
  • In production mode
  • With watcher
  • Debug performance
  • Usage

Was this helpful?

  1. Tools
  2. Processes

webpack

  • Alias: wp

  • For development use mhy wp serve

Default command

webpack --config mhy/configs/webpack

CLI Options

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

Examples

Default CLI

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

In production mode

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

With watcher

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
PrevioustscNextwebpack-bundle-analyzer

Last updated 3 years ago

Was this helpful?