I believe everyone has encountered the NPM package written by local debugging,npm linkYou deserve to know
Create links between NPM modules and local projects
NPM module — NPM package project
NPM example — use NPM package project
- Enter NPM package project and execute NPM link
After the execution is completed, the node will be displayed locally on your computer_ Modules package (Location: C: \ users \ DFTD \ appdata \ roaming \ NPM \ node_modules \ xxxxx)
- Enter the NPM example project and execute NPM link NPM module
At this time, the imported package is imported in a quick way, which is obviously different from other normal packages
-
The way this package is introduced in NPM example is also slightly different:
The above is local import and the following is conventional NPM package import
Unlink
- Unlink project from NPM module
Enter NPM example and execute NPM unlink NPM module - Unlink modules globally
Enter NPM module and execute NPM unlink NPM module