.nuxtignore
.nuxtignore 文件允许 Nuxt 在构建阶段忽略项目根目录中的文件。
.nuxtignore
文件指示 Nuxt 在构建阶段忽略项目根目录 (rootDir
) 中的文件。
¥The .nuxtignore
file tells Nuxt to ignore files in your project’s root directory (rootDir
) during the build phase.
它遵循与 .gitignore
和 .eslintignore
文件相同的规范,其中每一行都是一个全局模式,指示应忽略哪些文件。
¥It is subject to the same specification as .gitignore
and .eslintignore
files, in which each line is a glob pattern indicating which files should be ignored.
用法
¥Usage
.nuxtignore
# ignore layout foo.vue
layouts/foo.vue
# ignore layout files whose name ends with -ignore.vue
layouts/*-ignore.vue
# ignore page bar.vue
pages/bar.vue
# ignore page inside ignore folder
pages/ignore/*.vue
# ignore route middleware files under foo folder except foo/bar.js
middleware/foo/*.js
!middleware/foo/bar.js
:
有关该规范的更多详细信息,请参阅 gitignore 文档。
¥More details about the spec are in the gitignore documentation.
::