Honeypack is a combination of webpack-dev-server and webpack-dev-middleware, which provides full featured and scalable configuration to bundle assets, and supports HMR.
npm i honeypack --save-dev
Please read our documentation on migration.
honeypack --help
>
Usage: honeypack [options]
honeypack <command> [options]
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
init [options]
run|start [options]
build [options]
honeypack init
>
Usage: init [options]
Options:
-o, --output <name> The config file name
--default Skip questions, create the config file directly
-h, --help output usage information
honeypack run|start
>
Usage: run|start [options]
Options:
-c, --config <path> Path to the config file, defaults to webpack.config.js
-h, --host <host> The host to listen on, defaults to localhost
-p, --port <port> The port to listen on, defaults to 8000
-h, --help output usage information
honeypack build
>
Usage: build [options]
Options:
-c, --config <path> Path to the config file, defaults to webpack.config.js
-h, --help output usage information
const honeypack = require('honeypack');
const express = require('express');
const app = express();
app.use(honeypack({
config: 'webpack.config.js',
root: './assets',
hot: false
}));
-
config: the webpack config filename
-
root: the directory contains your frontend assets
-
hot: enable HMR