1. Node environment installation

Download it at nodejs.cn/download/

After starting the installation, click Next until complete.

Check whether node is successfully installed: node -v

Check whether NPM is installed successfully: NPM -v

NPM install webpack-g

2. Create a project directory structure

Create folder: myWeb

Go to the project root directory and run: NPM init to generate package.json file

NPM install webpack –save-dev

After successful execution, you will find that the contents of the red box will appear under the myWeb folder:

3. Configure the Node environment

Place the packed package in the myWeb directory you just created. Create app.js file, add the code content for publishing in the js file, the key need to be packed into the package, as follows:

Finally, execute: node app.js

If you cannot find the module package, you can directly execute NPM install as shown below: