gpt4 book ai didi

gruntjs - 咕噜声 : possible to relocate "node_modules" for plugins?

转载 作者:行者123 更新时间:2023-12-02 03:01:49 25 4
gpt4 key购买 nike

如果我安装任何 grunt 插件,默认情况下它会添加到项目目录根目录中名为“node_modules”的文件夹中。

我的问题:是否可以将整个文件夹(以及所有插件)移动到另一个位置(但仍在我的项目文件夹内),比如说“build/node_modules”?

当然,在此更改之后,我仍然希望能够从项目层次结构中的任何位置运行 grunt。

最佳答案

不,这是 Node.JS 核心文件的一个功能。也许您不知道,Node.JS 是 Grunt 构建的平台。

所有不指向绝对文件或以 ./ 开头的 require() 调用都会尝试在 node_modules 中查找模块文件夹。

关于gruntjs - 咕噜声 : possible to relocate "node_modules" for plugins?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16738177/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com