First, ensure that the applets base library version 2.2.1 or above, and developer tool 1.02.1808300 or above. (To support NPM)
Operation steps:
1. Open CMD, go to the root directory of the project, and initialize NPM.
After initialization, if a package.json file is found in the root directory of the small program, the initialization is successful.
2, in the applets project root directory to execute:
//IM SDK NPM install Tim-wx-sdk --save
//COS SDK NPM install COS-wx-sdk-v5 --save
Copy the code
3. Click the details in the upper right corner of the developer tool and check the use of NPM module.
4. Open the tool in the upper left corner of the applet and click Build NPM