Scenes:
The local npm package needs to be referenced and debugged in the project. It is impossible to publish it online for debugging.
Solution:
①Open the project package folder
②Build file
The output dist folder (default) will be used as a local project to reference the resource folder of the project package.
③Inject the project package into the local
npm link
If you want to know more about it, please read my article on the function and use of Npm link http://t.csdn.cn/salN7
④ Let your project not reference the npm release package, but reference the local npm project package
First, go to the package.json of the project package to see what the npm package is called.
Then go to the project and change the reference to @triascloud/x-components
npm link @triascloud/x-components
Rerun the project
npm run dev
unbundle
Under the project folder:
npm unlink @triascloud/x-components
Under the project package folder
npm unlink