\r\n \u003C/NuxtLayout>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\n- Run the project with `npm run dev` and note that the page has not loaded:\r\n```\r\nPlugin by my-module!\r\n√ Vite server hmr 4 files in 50.259ms\r\n[Vue warn]: Failed to resolve component: NuxtPage\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\nPlugin by my-module!\r\n[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n√ Vite server hmr 4 files in 143.147ms\r\n[Vue warn]: Failed to resolve component: NuxtPage\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\nPlugin by my-module!\r\n```\n\n### Describe the bug\n\nNuxt cleverly strips out all router functionality if a project does not have a pages directory. However, this functionality is still removed if an installed module calls 'extendPages', so modules can't actually provide pages unless the project itself already has some, which may not always be the case.\r\n\r\nI think router functionality should be preserved by Nuxt if `extendPages` is called.\r\n\n\n### Additional context\n\nI am creating a module which creates a catch all page so I can do my own routing. I don't want to need to create a page in every project in order for my module's page to take effect. I can imagine other modules will want to act similarly, even if they're only providing more specific routes/pages.\n\n### Logs\n\n_No response_",[2966,2969],{"name":2967,"color":2968},"3.x","29bc7f",{"name":2970,"color":2971},"pending triage","E99695",15060,"closed","Nuxt does not include router functionality when a module calls extendPages unless the project has its own pages directory","2023-01-19T17:44:18Z","https://github.com/nuxt/nuxt/issues/15060",0.6579818,{"description":2979,"labels":2980,"number":2983,"owner":2931,"repository":2931,"state":2973,"title":2984,"updated_at":2985,"url":2986,"score":2987},"### Describe the feature\n\nHey there! I'm really excited about the new `typedPages` feature. Great work on that one!\r\n\r\nI would like to create composable, for example a `useGetAppLocation`, that essentially returns a resolved url while adding a param that every url in my app needs. Example:\r\n\r\n```ts\r\n// props must be any because we don't have a type for it :/\r\nexport const useGetAppLocation = (props: any) => {\r\n\tconst router = useRouter()\r\n\tconst currentSpaceStore = useCurrentSpaceStore()\r\n\r\n\treturn router.resolve({\r\n\t\t...props,\r\n\t\tparams: {\r\n\t\t\t...props.params,\r\n\t\t\tspaceKey: currentSpaceStore.currentSpaceKey\r\n\t\t}\r\n\t})\r\n}\r\n```\r\n\r\nI would like to type this function, but as far as I can see nuxt doesn't export any types to do so. The `router.resolve()` uses `RouteNameMap`, `RouteLocationAsRelativeTyped`, `RouteLocationResolvedTyped ` and so on.\r\n\r\nIdeally, these types could be used in an application.\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2981,2982],{"name":2922,"color":2923},{"name":2967,"color":2968},21032,"`experimental.typedPages`: Export types to make usable in application","2023-05-24T12:19:35Z","https://github.com/nuxt/nuxt/issues/21032",0.6719148,{"labels":2989,"number":2994,"owner":2931,"repository":2931,"state":2973,"title":2995,"updated_at":2996,"url":2997,"score":2998},[2990,2991],{"name":2967,"color":2968},{"name":2992,"color":2993},"bug","d73a4a",13269,"`pages:extend` does not normalize page paths","2023-01-19T16:50:27Z","https://github.com/nuxt/nuxt/issues/13269",0.67419994,{"description":3000,"labels":3001,"number":3005,"owner":2931,"repository":2931,"state":2973,"title":3006,"updated_at":3007,"url":3008,"score":3009},"Hey guys, I came up with a pattern to allow me have routes defined externally, in a single file, rather than automatically by Nuxt. I understand this goes off the framework's philosophy, but I like the fact that you've made it possible. What's missing from the docs is just how easy it is to accomplish this.\r\n\r\n1. Create a pages/index.js file like so:\r\n\r\n```js\r\nmodule.exports = [\r\n {\r\n name: 'login',\r\n path: '/login',\r\n component: 'src/pages/auth/login.vue'\r\n }\r\n] \r\n```\r\n\r\n2. Add the following to `nuxt.config.js`:\r\n\r\n```js\r\nconst routes = require('./src/pages/index')\r\n\r\nmodule.exports = {\r\n ...\r\n router: {\r\n extendRoutes (nuxtRoutes, resolve) {\r\n nuxtRoutes.splice(0, nuxtRoutes.length, ...routes.map((route) => {\r\n return {\r\n ...route,\r\n component: resolve(__dirname, route.component)\r\n }\r\n }))\r\n }\r\n ...\r\n}\r\n```\r\n\r\nAnd there you have it: routes defined in a file. I know you can also specify a `chunkName` for each route, but that doesn't seem to do much for me. Should I be concerned?\r\n\r\nAnyhow, this is NOT an issue, just a documentation enhancement proposal.\r\n\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c7271\">#c7271\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3002],{"name":3003,"color":3004},"2.x","d4c5f9",3460,"A simple extendRoutes() pattern","2023-01-18T16:24:09Z","https://github.com/nuxt/nuxt/issues/3460",0.6756176,{"description":3011,"labels":3012,"number":3015,"owner":2931,"repository":2931,"state":2973,"title":3016,"updated_at":3017,"url":3018,"score":3019},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v18.7.0`\r\n- Nuxt Version: `3.0.0-rc.13`\r\n- Nitro Version: `0.6.1`\r\n- Package Manager: `npm@8.15.0`\r\n- Builder: `vite`\r\n- User Config: `typescript`, `build`, `modules`, `css`, `runtimeConfig`\r\n- Runtime Modules: `@lewebsimple/nuxt3-svg@0.1.1`, `@nuxtjs/tailwindcss@6.1.3`, `@pinia/nuxt@0.4.3`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\n[Demonstration](https://stackblitz.com/edit/github-bm1tnv?file=pages/index.vue)\r\n\r\nI create a reusable transition `/composables/transitions/translateContent.ts` :\r\n\r\n```ts\r\nimport {timeline} from \"motion\";\r\n\r\nexport let useTranslateContent = {\r\n css: false,\r\n onLeave: async (el: HTMLElement, done: Function) => {\r\n // logic\r\n await timeline(\u003Cany>sequence).finished;\r\n\r\n done();\r\n },\r\n onEnter: async (el: Element, done: Function) => {\r\n // logic\r\n await timeline(\u003Cany>sequence).finished;\r\n\r\n done();\r\n }\r\n}\r\n```\r\n\r\nI apply my transition with `definePageMeta` : \r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003CNuxtLayout>\r\n \u003C!-- DOM -->\r\n \u003C/NuxtLayout>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup lang=\"ts\">\r\nimport {useTranslateContent} from \"../composables/transitions/translateContent\";\r\ndefinePageMeta({\r\n pageTransition: useTranslateContent\r\n})\r\n\r\n\u003C/script>\r\n```\n\n### Describe the bug\n\nNuxt indicates `useTranslateContent is not defined`.\n\n### Additional context\n\nWith previous version, it works.\n\n### Logs\n\n```shell\n[nuxt] [request error] [unhandled] [500] useTranslateContent is not defined\r\n at ./pages/index.vue?macro=true:2:23\r\n at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:250:11)\r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:129:12)\r\n at async request (./node_modules/vite-node/dist/client.mjs:152:16)\r\n at async virtual:nuxt:./.nuxt/routes.mjs:1:238\r\n at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:250:5)\r\n at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:129:12)\r\n at async request (./node_modules/vite-node/dist/client.mjs:152:16)\r\n at async ./node_modules/nuxt/dist/pages/runtime/router.mjs:12:31\r\n```\n```\n",[3013,3014],{"name":2967,"color":2968},{"name":2970,"color":2971},15393,"Module is not defined from definePageMeta","2023-01-19T17:49:30Z","https://github.com/nuxt/nuxt/issues/15393",0.6784875,{"description":3021,"labels":3022,"number":3024,"owner":2931,"repository":2931,"state":2973,"title":3025,"updated_at":3026,"url":3027,"score":3028},"I'm building an app with Nuxt and would like to separate out some of the pages into another folder. Effectively, I'd like to combine 2 or more sets of Nuxt files and combine them into a single app.\r\n\r\nHere's the folder structure I'm trying:\r\n```\r\napp\r\n└─ packages\r\n ├─ main\r\n │ ├─ assets\r\n │ ├─ components\r\n │ ├─ pages\r\n │ ├─ store\r\n │ ├─ (other nuxt folders...)\r\n │ └─ nuxt.config.js\r\n └─ plugin-a\r\n ├─ assets\r\n ├─ components\r\n ├─ (other nuxt folders...)\r\n ├─ index.js\r\n └─ nuxt.config.js\r\n```\r\n\r\nI'm using the express-template for the main package and the starter-template for the plugin-a package. The index.js in plugin-a creates and builds a Nuxt instance, then exports it. server/index.js in main will then import this Nuxt instance and set up an express route to render it.\r\n\r\nHere's the code:\r\n\r\nplugin-a/index.js\r\n```javascript\r\nconst { Nuxt, Builder } = require('nuxt')\r\n\r\nconst nuxtConfig = require('./nuxt.config')\r\nnuxtConfig.dev = !(process.env.NODE_ENV === 'production')\r\n\r\n// Init Nuxt.js\r\nconst nuxt = new Nuxt(nuxtConfig)\r\n\r\n// Build only in dev mode\r\nif (nuxtConfig.dev) {\r\n new Builder(nuxt).build()\r\n}\r\n\r\nmodule.exports = nuxt\r\n```\r\n\r\nmain/server/index.js\r\n```javascript\r\nimport express from 'express'\r\nimport { Nuxt, Builder } from 'nuxt'\r\nimport pluginA from 'plugin-a' // import the plugin nuxt instance\r\n\r\nimport api from './api'\r\n\r\nconst app = express()\r\nconst host = process.env.HOST || '127.0.0.1'\r\nconst port = process.env.PORT || 3000\r\n\r\napp.set('port', port)\r\n\r\n// Import API Routes\r\napp.use('/api', api)\r\n\r\n// Import and Set Nuxt.js options\r\nlet config = require('../nuxt.config.js')\r\nconfig.dev = !(process.env.NODE_ENV === 'production')\r\n\r\n// Init Nuxt.js\r\nconst nuxt = new Nuxt(config)\r\n\r\n// Build only in dev mode\r\nif (config.dev) {\r\n new Builder(nuxt).build()\r\n}\r\n\r\n// Give nuxt middleware to express\r\napp.use('/main', nuxt.render)\r\napp.use('/plugina', pluginA.render) // render the plugin\r\n\r\n// Listen the server\r\napp.listen(port, host)\r\nconsole.log('Server listening on ' + host + ':' + port) // eslint-disable-line no-console\r\n```\r\n\r\nThe problem is Nuxt.render only seems to use the files in the current directory, so both /main and /plugina show the pages from the main package. Alternatively, if I try calling ```new Builder(pluginA).build()``` in main/server/index.js I get unexpected token errors in .nuxt/client.js (I assume Nuxt doesn't like ```Builder.build``` being called more than once).\r\n\r\nI'm pretty stuck at this point and I don't see any way to approach this, aside from rolling my own Vue SSR implementation to handle this.\r\n\r\nIf anyone has any ideas about how to split up a Nuxt app like this that they could share, I'd very much appreciate it.\r\n\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2191\">#c2191\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3023],{"name":3003,"color":3004},2522,"Importing pages from another module","2023-01-18T16:02:15Z","https://github.com/nuxt/nuxt/issues/2522",0.68020827,{"description":3030,"labels":3031,"number":3034,"owner":2931,"repository":2931,"state":2973,"title":3035,"updated_at":3036,"url":3037,"score":3038},"### Environment\n\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.7.3\r\n- CLI Version: 3.8.4\r\n- Nitro Version: 2.6.3\r\n- Package Manager: pnpm@8.6.1\r\n- Builder: -\r\n- User Config: runtimeConfig, modules, piniaPersistedstate, viewport, css, vite, vue, app, build, nitro, swiper, typescript, devtools\r\n- Runtime Modules: @artmizu/nuxt-prometheus@2.2.0, @nuxt/content@2.8.2, @pinia/nuxt@0.4.11, @pinia-plugin-persistedstate/nuxt@1.1.2, @vee-validate/nuxt@4.11.6, @vueuse/nuxt@10.4.1, nuxt-viewport@2.0.6, nuxt-swiper@1.2.2, nuxt-vitest@0.10.2\r\n- Build Modules: -\n\n### Reproduction\n\n- Go to: https://stackblitz.com/edit/nuxt-dynamic-route-components?file=pages%2FPageOne.vue,pages%2FPageThree.vue,app%2Frouter.options.ts\r\n- Open dev tools in web browser\r\n\n\n### Describe the bug\n\nI use dynamic imports in my router configuration to reduce the amount of data downloaded when entering a website. Unfortunately, Nuxt downloads other page components anyway.\r\n\r\n```ts\r\nexport default \u003CRouterConfig>{\r\n routes: () => [\r\n {\r\n name: 'page-one',\r\n path: '/',\r\n component: () => import('../pages/PageOne.vue'),\r\n },\r\n {\r\n name: 'page-two',\r\n path: '/two',\r\n component: () => import('../pages/PageTwo.vue'),\r\n },\r\n {\r\n name: 'page-three',\r\n path: '/three',\r\n component: () => import('../pages/PageThree.vue'),\r\n },\r\n ],\r\n};\r\n```\r\n\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3032,3033],{"name":2967,"color":2968},{"name":2970,"color":2971},23401,"Page components that should be loaded dynamically are loaded immediately","2023-09-25T20:50:33Z","https://github.com/nuxt/nuxt/issues/23401",0.6906084,["Reactive",3040],{},["Set"],["ShallowReactive",3043],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fpFpnMy2P-edPWcUgc-K7lmExCBx7KDvenVvUKNNcAG4":-1},"/nuxt/nuxt/23927"]