We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef90f2a commit b3bbf0cCopy full SHA for b3bbf0c
packages/nuxt/src/module.ts
@@ -99,10 +99,13 @@ export default defineNuxtModule<ModuleOptions>({
99
100
nuxt.hooks.hook('pages:extend', pages => {
101
pagesDataTemplate.getContents = () => {
102
- const pagesSubset = pages.map(page => ({
103
- file: page.file,
104
- path: page.path,
105
- }));
+ const pagesSubset = pages
+ .map(page => ({ file: page.file, path: page.path }))
+ .filter(page => {
+ // Check for dynamic parameter (e.g., :userId or [userId])
106
+ return page.path.includes(':') || page?.file?.includes('[');
107
+ });
108
+
109
return `export default ${JSON.stringify(pagesSubset, null, 2)};`;
110
};
111
});
0 commit comments