Nuxt项目启动时Are you interested in participation设置如何修改

测试环境

操作系统:Win10
Nuxt:2.15.8

如果是第一次运行Nuxt项目,在正式执行前,会出现这样一段话

i NuxtJS collects completely anonymous data about usage.                                                      12:17:34
  This will help us improve Nuxt developer experience over time.
  Read more on https://git.io/nuxt-telemetry

? Are you interested in participating?(Y/n)

当初没特别留意,就输入了Y,仔细看了看,觉得不想要被收集信息,所以想要改为n,但是再次运行的时候这段话并没有出现,想改都改不了了,于是把这个测试项目删除了,再次新建一个项目,但是这个新建的项目运行时同样没有出现这段文字,应该是为这台电脑默认了收集信息的设置,于是乎翻看了许多相关资料,基本上都是如何不让这段文字二次提示(可能老版本会在每次运行的时候都需要设置一遍),跟需求不符,那这个设置就不能更改了?偶然间想起了一些配置文件会在用户文件夹下显示,于是看看了,还真在C:\Users\Administrator中找到了这个文件.nuxtrc,这里就记录着上述文字的选择结果,删除该文件后,再次运行项目,弹出了上述文字,这次选择了n。

其实Nuxt收集的也非什么重要的信息,具体收集信息如下,如果介意,就选项n,如果不介意就选择Y,无论选择什么,都可以根据上述方法再次调整。

We collect multiple events:

Command invoked (nuxt dev, nuxt build, etc)
Versions of Nuxt and Node.js
General machine information (MacOS/Linux/Windows and if command is run within CI, the CI name)
Duration of the Webpack build and average size of the application, as well as the generation stats (when using nuxt generate)
What are the public dependency of your project (Nuxt modules)
The code is open source and available at https://github.com/nuxt/telemetry .

以上是针对所有项目进行设置,如果想要针对单个项目进行设置

You can disable Nuxt Telemetry for your project with several ways:

Using npx nuxt telemetry disable
npx nuxt telemetry [status|enable|disable] [-g,--global] [dir]

Using an environment variable
NUXT_TELEMETRY_DISABLED=1

Setting telemetry: false in your nuxt.config.js:
nuxt.config.js
export default {
  telemetry: false
}

You can learn more about Nuxt Telemetry and the events sent on https://github.com/nuxt/telemetry

猜你喜欢

转载自blog.csdn.net/a7442358/article/details/124611511
You
今日推荐