我有一个网络应用程序位于
C:\Google-drive\vue-app
下。运行 yarn build
命令将在 C:\Google-drive\vue-app
中安装 node_modules 文件夹。我正在使用 Google Drive 将我的网络应用程序源代码同步到 Google 云。我面临的问题是node_modules 中的数千个文件将使Google Drive 崩溃。
是否有某种方法可以配置 package.json 以在
C:\Google-drive\vue-app
之外安装 node_modules 文件夹并将其安装在名为 C:\temp\node_storage
的位置?
我愿意接受任何可以阻止 Google Drive 同步 node_modules 文件夹的解决方案。它不一定需要配置 package.json
尝试使用图像来运行应用程序,例如docker 或 kubernetes 会有所帮助。 它将为应用程序创建一个新的沙箱并易于维护。