nuxt
nuxt copied to clipboard
.nuxtignore should have separate development and production variations
What problem does this feature solve?
We have a components gallery with several pages that we use for building and displaying components in isolation. This is very useful in development but I wanted to exclude these pages from the production build.
I found the documentation for .nuxtignore
(https://nuxtjs.org/api/configuration-ignore/) but the following copy lead me to believe that it would only be applied in production as part of a nuxt build
.
You can use a .nuxtignore file to let Nuxt.js ignore layout, page, store and middleware files in your project’s root directory (rootDir) during the build phase.
This should be clarified in the documentation. However, I think it would be useful to have separate .nuxtignore.dev
and .nuxtignore.prod
files that allow more fine grained control to ignore different files/directories based on the environment.