After installing webpack-dev-server, you need to configure webpack-dev-server.
First modify the
dev command in
package.json
->
scripts
, and add serve after webpack.
Run
the npm run dev
command again to repackage the project. At this point the following error occurs:
The version of webpack-cli
is too low,
just update
webpack-cli
to
4.10.0
the latest version.
Code:
npm install [email protected] [email protected] -D