我自己写了一个模块放在了 node_modules 文件夹里面,但是每次执行 npm install/yarn 的时候会自动把我的组件给清理了。怎么设置才能不让 npm 自动清理呢?
project
--src
--node_modules
----我的模块
----其他模块
--package.json
project
--src
--node_modules
----我的模块
----其他模块
--package.json
|
nightcatNov 18, 2017 via Android
1
模块没手动写入 package.json 依赖?
|
|
kfllNov 18, 2017 via iPhone
2
推荐 yarn workspace
|
|
pynixNov 18, 2017
4
npm link
|
|
KokororinNov 18, 2017
5
yarn add file:./../your-package
|
|
chnwillliuNov 19, 2017
7
excuse me? 自己写的模块为啥要放到 node_modules 里?
|
|
8
@chnwillliu 之前以为独立模块都需要放在 node_modules 里面。。。
|