webpack5.0 installation and use
In the previous words, because of the different versions, the installation method and related instruction writing methods will also be different. The latest version is
1. Download node.js
2. Enter the following code in cmd, first install the webpack command into the computer globally through
npm install webpack -g
3. The cmd cd command makes the current directory go to the directory of the current project, and then enter the following This command generates a package.json file
npm init
completed the
"pit one"
JS file packaging command as
webpack ./src/main.js -o ./dist/bundle.js --mode=development
Construction of development environment