Home

Issue: 2435

asyncData called on child pages that have not been included in parent

[issue link]

If there is a child page where the parent has not included a the child will still run the asyncData function.

Here is a repro:
https://subdued-pest.glitch.me
https://glitch.com/edit/#!/subdued-pest?path=pages/_page1/_page2/_page2.vue:13:9

Should the asyncData functions for pages/child pages only be run when the child is actually included/required?

I think in this scenario it is because the child page also matches the route but I can’t be sure that’s why.

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