To use the dashboard, you must perform two steps: add the plugin to your webpack configuration and wrap your dev server start script with the webpack-dashboard CLI.
Note: webpack-dashboard@^3.0.0 requires Node 8 or above.
1. Add the plugin to webpack config
Import DashboardPlugin from webpack-dashboard/plugin and add it to your plugins array.
2. Update your start script
Prefix your existing dev command with webpack-dashboard --. The -- separator is used to pass the remaining arguments to your command.
Example transformation:
If your script was:
"dev": "webpack-dev-server"
Change it to:
"dev": "webpack-dashboard -- webpack-dev-server"
const DashboardPlugin = require("webpack-dashboard/plugin");
module.exports = {
// ...
plugins: [new DashboardPlugin()],
// ...
};
// In package.json:
"scripts": {
"dev": "webpack-dashboard -- webpack-dev-server"
}