Nuxt.js: Add ignore to page to avoid nuxt route auto generation

Created on 9 Feb 2017  路  2Comments  路  Source: nuxt/nuxt.js

Hi, I encountered a problem when I tried to split a large page into pieces.
For example, I have a page which includes three tabs. I want to split them into three different files and then import as a component. But if I define these tabs in ~pages directory, nuxt will auto generate routes related to them which is not what I want.
Meanwhile, I think it is not a good way to place these files in ~components directory, cuz they are not components but pieces of a large page.
So I think maybe there can be something like a ignore mark in page which can tell nuxt that it should not be regarded as a page.

Thanks

This question is available on Nuxt.js community (#c198)
question

Most helpful comment

Hi,
Nuxt generate a route for every file in the ~pages directory and we don't want to avoid this behaviour.
If you don't want to put tabs in the ~components you are free to create a ~partials directory to put these tabs and import them as a component with ~/partials/tab_one for example.

All 2 comments

Hi,
Nuxt generate a route for every file in the ~pages directory and we don't want to avoid this behaviour.
If you don't want to put tabs in the ~components you are free to create a ~partials directory to put these tabs and import them as a component with ~/partials/tab_one for example.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredreich picture jaredreich  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

vadimsg picture vadimsg  路  3Comments

bimohxh picture bimohxh  路  3Comments

vadimsg picture vadimsg  路  3Comments