Is it possible to build or generate only specific pages from a Nuxt project? In other words, a subset of the project.
In example, let's say I have the following pages directory:
pages/
|
|- index.vue
|- about-us.vue
|- pricing.vue
|- moduleA
|
|- index.vue
|- _id.vue
|- moduleB
|
|- index.vue
|- _id.vue
By doing nuxt generate
, all pages would be built and the ones that can be pre-render, will be pre-render. Is there a way of only building, for example, everything but moduleB/
?
Right now I'm using the nuxt hook generate:extendRoutes
to do a list of only the routes that I want to generate as suggested here: https://github.com/nuxt/nuxt.js/issues/2719#issuecomment-362871101 . However, even though only those routes are generated, if one of the routes has a dependency to a module that is not in the list, it will still load that module.
i.e. If everything but moduleB/
is generated, but pricing.vue
has a link to moduleB/index.vue
, you can still access it by going /pricing => /moduleB
What I want is a subset of the project, so that moduleB/
is not accessible at all without having to fork the project, delete moduleB/
, and then build that forked project. Is that possible?