grunt: possible to relocate “node_modules” for plugins?

后端 未结 2 418
陌清茗
陌清茗 2021-01-17 19:47

If I install any grunt plugin, it is added to a folder named \"node_modules\" in the root of my project dir per default.

My question: is it possible to move this wh

相关标签:
2条回答
  • 2021-01-17 20:04

    You can use symbolic link ln -s /original_node_modules_path/node_modules ./node_modules

    0 讨论(0)
  • 2021-01-17 20:17

    Nope, that's a feature of the Node.JS core files. In the case you don't know, Node.JS is the platform which Grunt was built.

    All require() calls which don't point to an absolute file or start with ./ will try to find modules inside node_modules folders.

    0 讨论(0)
提交回复
热议问题