\n \u003C/UFormGroup>\n\n \u003CUButton type=\"submit\">\n Submit\n \u003C/UButton>\n\n\u003C/UForm>\n```\n\n```ts\n\u003Cscript setup lang=\"ts\">\n import { z } from 'zod';\n\n const state = reactive({\n picture: undefined,\n })\n\n const schema = z.object({\n picture: z.custom\u003CFileList>()\n .transform((val) => {\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n })\n .superRefine((file, ctx) => {\n if (!(file instanceof File)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: 'Not a file',\n });\n return z.NEVER;\n }\n if (file.size > 5 * 1024 * 1024) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Max file size allowed is 5MB',\n });\n }\n if (\n !['image/jpeg', 'image/png', 'image/webp', 'image/jpg'].includes(\n file.type\n )\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'File must be an image (jpeg, jpg, png, webp)',\n });\n }\n })\n });\n\n type Schema = z.infer\u003Ctypeof schema>;\n\n async function onSubmit (event: FormSubmitEvent\u003CSchema>) {\n console.log(event.data);\n }\n\u003C/script>\n```\n\nAs aspected the following onChange function logs a FileList\n\n```ts\nfunction onChangeFile(event: Event) {\n console.log(event)\n}\n```\n\nBut when I log val in the transform function of Zod\n\n```ts\n.transform((val) => {\n console.log(val);\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n})\n```\n\nI get a string like this:\n\n```\nC:\\fakepath\\Screenshot 2024-10-25 at 10.26.36.png\n```\n\nCan someone please help me out, i'm looking for a few days now for a solution.",[1984],{"name":1985,"color":1986},"question","d876e3",2462,"nuxt","ui","open","UInput with type='file', how to validate with Zod?","2025-03-10T01:51:18Z","https://github.com/nuxt/ui/issues/2462",0.61340755,{"description":1996,"labels":1997,"number":2007,"owner":1988,"repository":1988,"state":1990,"title":2008,"updated_at":2009,"url":2010,"score":2011},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.14.0\r\n- Nuxt Version: 3.12.4\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: pnpm@9.4.0\r\n- Builder: -\r\n- User Config: ssr, app, compatibilityDate, modules\r\n- Runtime Modules: @nuxt/ui@2.18.4\r\n- Build Modules: -\r\n------------------------------\r\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-feikgn?file=package.json\n\n### Describe the bug\n\nWhen setting `app.baseURL` to `./`, it gets ignored when using `nuxt generate` and the generated links in `dist/index.html` point to `href=/.nuxt/..` instead of `href=./.nuxt/..`\n\n### Additional context\n\nI'm using `ssr: false`, but when I remove this/set it to `ssr: true`, the generated `rel=\"preload\"` link is the only one that has the correct `./` prefix in the `href`.\r\n\r\nWhen using anything else, it works fine. My current approach is setting the value to `/replaceMeWith./` and then replacing all occurences, but this isn't ideal and shouldn't be needed.\n\n### Logs\n\n_No response_",[1998,2001,2004],{"name":1999,"color":2000},"good first issue","fbca04",{"name":2002,"color":2003},"bug","d73a4a",{"name":2005,"color":2006},"🔨 p3-minor","FBCA04",28474,"relative path not supported for `app.baseURL`","2024-11-19T11:52:03Z","https://github.com/nuxt/nuxt/issues/28474",0.6712939,{"description":2013,"labels":2014,"number":2015,"owner":1988,"repository":2016,"state":1990,"title":2017,"updated_at":2018,"url":2019,"score":2020},"I've been using the new Nuxt website for a few months right now and wanted to provide some UX feedback based on my developer usage. For context I find myself using the docs multiple times a day.\n\n1. When searching the docs the text input field gets blocked from rendering which means there is a disconnect with what you're typing and what is displayed. I don't think the search results need to be instant but what you're typing in the text input should not be blocked. For example in the recording below I am constantly typing but it's really choppy and I finished typing a full 10 seconds before my typed text is actually completely displayed.\n\n\n\n2. The animations for the menus are cool but the artificial delay trips me up multiple times a day if I'm moving \"too fast\". I know where I want to go but frequently find myself needing to slow down or try again to get to the menu that I want because of the delay.\n\n\n\n_All if this feedback is in contrast to the previous website which I didn't have nearly as much friction using when navigation around and didn't feel like I was be throttled when navigating through the docs. If this was only a marketing page that would be fine but since it's also developer documentation I think it should be a bit more responsive._",[],1857,"nuxt.com","Laggy search and navigation feedback","2025-04-15T11:39:18Z","https://github.com/nuxt/nuxt.com/issues/1857",0.6737918,{"description":2022,"labels":2023,"number":2028,"owner":1988,"repository":1989,"state":1990,"title":2029,"updated_at":2030,"url":2031,"score":2032},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v22.8.0\n- Nuxt Version: 3.13.2\n- CLI Version: 3.13.2\n- Nitro Version: 2.9.7\n- Package Manager: yarn@1.22.22\n- Builder: -\n- User Config: modules, plugins, css, colorMode, tiptap, runtimeConfig, nitro, routeRules, compatibilityDate\n- Runtime Modules: @nuxt/ui@2.20.0, @pinia/nuxt@0.5.4, @vueuse/nuxt@11.1.0, nuxt-tiptap-editor@2.0.0\n- Build Modules: -\n\n### Version\n\nv2.20.0\n\n### Reproduction\n\n```\n\u003Cscript setup lang=\"ts\">\nenum DiscountType {\n Fixed = 0,\n Percentage = 1\n}\n\nconst types = [\n {\n label: \"€\",\n value: DiscountType.Fixed\n },\n {\n label: \"%\",\n value: DiscountType.Percentage\n }\n]\nconst type = ref\u003CDiscountType>(DiscountType.Fixed)\n\u003C/script>\n\n\u003Ctemplate>\n \u003CUSelectMenu v-model=\"type\" :options=\"types\" value-attribute=\"value\" />\n\u003C/template>\n```\n\nSelectMenu does not display the label associated to the falsy value \"0\":\n\n\nThe list is populated with both values:\n\n\nThe label associated to the truthy value \"1\" is displayed as expected:\n\n\n### Description\n\nAll falsy values are not displayed anymore since v2.20.0 due to the rework of the computed `label` in the SelectMenu component.\n\nHere is the definition of this computed in `/src/runtime/components/form/SelectMenu.vue`:\n```\nconst label = computed(() => {\n if (!props.modelValue) return null\n\n if (Array.isArray(props.modelValue) && props.modelValue.length) {\n return `${props.modelValue.length} selected`\n } else if (['string', 'number'].includes(typeof props.modelValue)) {\n return props.valueAttribute ? accessor(selected.value, props.optionAttribute) : props.modelValue\n }\n\n return accessor(props.modelValue as Record\u003Cstring, any>, props.optionAttribute)\n})\n```\n\n**The component should treat `0`, `\"\"` and `false` as \"acceptable\" labelled values.**\n\nI believe the first condition should be either :\n`if(props.modelValue == null) return null` \nOr:\n`if(props.modelValue === null || props.modelValue === undefined) return null` \n\n### Additional context\n\nI will try to find some time to create a pull request if this is accepted as an issue. Not sure I can manage to do it short-term though.\n\n### Logs\n\n```shell-script\n\n```",[2024,2025],{"name":2002,"color":2003},{"name":2026,"color":2027},"triage","ffffff",3132,"SelectMenu label not displayed for falsy values","2025-01-17T15:36:46Z","https://github.com/nuxt/ui/issues/3132",0.68268496,{"description":2034,"labels":2035,"number":2036,"owner":1988,"repository":2037,"state":1990,"title":2038,"updated_at":2039,"url":2040,"score":2041},"Hi, hope you're all doing well!\r\n\r\nI ran into an issue using `@nuxt/ui` which now uses `@nuxt/icon` under the hood (used to work when icon collection names could be specified as nuxt/ui module args even tho i had to add a ts-ignore as it wasn't referenced in the enum type), I am using a custom iconify collection i built which goes by\r\n```json filename=\"package.json\"\r\n\"@iconify-json/as\": \"npm:@my-org-name/my-icon-collection@^0.0.2\",\r\n```\r\nin my package.json which isn't referenced in\r\nhttps://github.com/nuxt/icon/blob/main/src/collection-names.ts\r\nthus making it uncompatible with `@nuxt/icon`.\r\nI think the issue comes from the usage of `collectionNames` there (as it seems we only values are only read if they are part of the underlying array):\r\nhttps://github.com/nuxt/icon/blob/cc14fe49b19fce023ba6f049984317492043c9ab/src/collections.ts#L72-L73\r\nWould it be possible further expand the compatibility to include custom collections? (and eventually check if these are installed print an error on the logger if it isn't the case)\r\n\r\nNOTE: It seems to work when using this configuration (note SSR isn't set to false which is a constraint I have)\r\n```ts filename=\"nuxt.config.ts\"\r\nicon: {\r\n serverBundle: {\r\n collections: [\r\n 'as'\r\n ]\r\n }\r\n}\r\n```\r\nbut it the specific project is using this piece of config\r\n```ts filename=\"nuxt.config.ts\"\r\n[...]\r\nssr: false, // SSR forced to false\r\nicon: {\r\n provider: 'server', // Tried with and without this\r\n serverBundle: {\r\n collections: [\r\n 'as'\r\n ]\r\n }\r\n}\r\n```\r\n\r\nSorry if it is a bit long, I tried my best to keep it pleasant to read though. Thank you in advance! :)\r\n",[],252,"icon","Custom collections aren't recognised","2024-09-10T10:57:04Z","https://github.com/nuxt/icon/issues/252",0.6854476,{"description":2043,"labels":2044,"number":2052,"owner":1988,"repository":1989,"state":1990,"title":2053,"updated_at":2054,"url":2055,"score":2056},"### Description\n\nIt would be cool to be able to create an SEO-friendly NavigationMenu on mobile that appears when a button is clicked in the Slideover or Drawer components. However, the problem is that the menu component itself has the unmount-on-hide property, which makes it SEO-friendly, whereas the Slideover or Drawer where I would like to place this menu do not.\n\n### Additional context\n\n_No response_",[2045,2048,2051],{"name":2046,"color":2047},"enhancement","a2eeef",{"name":2049,"color":2050},"v3","49DCB8",{"name":2026,"color":2027},3622,"unmount-on-hide for Drawer, Slideover","2025-03-20T05:37:58Z","https://github.com/nuxt/ui/issues/3622",0.6912889,{"description":2058,"labels":2059,"number":2061,"owner":1988,"repository":2037,"state":1990,"title":2062,"updated_at":2063,"url":2064,"score":2065},"How can I disable icon caching? I'm doing svg animation and I need hmr when changing an svg file.\r\n\r\nhttps://stackblitz.com/edit/nuxt-icon-playground-mjfbfn?file=assets%2Ficons%2Fnuxt-icon.svg\r\nTry changing the fill attribute of the svg file and save it",[2060],{"name":1985,"color":1986},160,"how to disable svg caching","2024-12-21T19:58:04Z","https://github.com/nuxt/icon/issues/160",0.70388514,{"description":2067,"labels":2068,"number":2071,"owner":1988,"repository":2016,"state":2072,"title":2073,"updated_at":2074,"url":2075,"score":2076},"```\n:resources-blog-list\n\n->\n\n::resources-blog-list\n::\n```\n\nThis should fix the hydration errors",[2069],{"name":2002,"color":2070},"ff281a",587,"closed","[Content] Replace all inline components in markdown","2023-02-15T12:32:34Z","https://github.com/nuxt/nuxt.com/issues/587",0.6880034,{"description":2078,"labels":2079,"number":2071,"owner":1988,"repository":2086,"state":2072,"title":2087,"updated_at":2088,"url":2089,"score":2076},"After updating to 0.6.10 on Nuht 3 version 3.4.1, i get an error when I try to start\r\n\r\n`\"vitest-environment-nuxt\": \"^0.6.10\"`\r\n\r\n```\r\n❯ yarn test-ui\r\n(node:51339) V8: /Users/ibochkarev/Projects/XXXX/XXXX/node_modules/ttf2woff2/jssrc/ttf2woff2.js:3 Invalid asm.js: Invalid member of stdlib\r\n(Use `node --trace-warnings ...` to show where the warning was created)\r\n\r\n DEV v0.30.1 /Users/ibochkarev/Projects/XXXX/XXXX\r\n UI started at http://localhost:51204/__vitest__/\r\n\r\n\r\n Test Files no tests\r\n Tests no tests\r\n Start at 13:52:13\r\n Duration 368ms (transform 0ms, setup 0ms, collect 0ms, tests 0ms, environment 0ms, prepare 0ms)\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\nVitest caught 39 unhandled errors during the test run.\r\nThis might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nDataCloneError: (path) => path.replace(/^\\/oc/, '') could not be cloned.\r\n ❯ new DOMException node:internal/per_context/domexception:72:5\r\n ❯ WorkerInfo.postTask node_modules/tinypool/dist/esm/index.js:421:17\r\n ❯ ThreadPool.runTask node_modules/tinypool/dist/esm/index.js:712:16\r\n ❯ Tinypool.run node_modules/tinypool/dist/esm/index.js:760:38\r\n ❯ runFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7217:20\r\n ❯ node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7254:99\r\n ❯ Object.runTests node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7254:59\r\n ❯ Object.runTests node_modules/vitest/dist/vendor-cli-api.70680cd5.js:7396:5\r\n ❯ async file:/Users/ibochkarev/Projects/umatech/premier.one-v3/node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13913:9\r\n ❯ Vitest.runFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13927:12\r\n ❯ Vitest.start node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13836:5\r\n ❯ startVitest node_modules/vitest/dist/vendor-cli-api.70680cd5.js:20784:5\r\n```\r\n\r\nThis line, which swears at startup, is in nuxt.config.ts config in the proxy section and looks like this\r\n\r\n```js\r\n'/oc': {\r\n target: process.env.NUXT_OC_BACKEND_API_URL,\r\n cookieDomainRewrite: '',\r\n changeOrigin: true,\r\n rewrite: (path: string) => path.replace('/^\\/oc/, '')\r\n },\r\n```\r\n\r\nI tried excluding the config file:\r\n\r\n```js\r\nimport { configDefaults } from 'vitest/config'\r\nimport { defineVitestConfig } from 'nuxt-vitest/config'\r\n\r\nexport default defineVitestConfig({\r\n // any custom vitest config you require\r\n test: {\r\n environment: 'nuxt',\r\n exclude: [...configDefaults.exclude, ['src/shared/api/**', 'public/**', 'node_modules/**', 'nuxt.config.ts']],\r\n },\r\n})\r\n\r\n```\r\n\r\nbut now I get the error\r\n\r\n```\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nTypeError: pattern.startsWith is not a function\r\n ❯ isNegativePattern node_modules/vitest/dist/vendor-cli-api.70680cd5.js:4702:20\r\n ❯ convertToPositivePattern node_modules/vitest/dist/vendor-cli-api.70680cd5.js:4694:12\r\n ❯ getNegativePatternsAsPositive node_modules/vitest/dist/vendor-cli-api.70680cd5.js:5044:31\r\n ❯ Object.generate node_modules/vitest/dist/vendor-cli-api.70680cd5.js:5004:30\r\n ❯ getWorks node_modules/vitest/dist/vendor-cli-api.70680cd5.js:6957:31\r\n ❯ FastGlob node_modules/vitest/dist/vendor-cli-api.70680cd5.js:6911:19\r\n ❯ WorkspaceProject.globFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13473:12\r\n ❯ WorkspaceProject.globAllTestFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13451:34\r\n ❯ WorkspaceProject.globTestFiles node_modules/vitest/dist/vendor-cli-api.70680cd5.js:13446:34\r\n```",[2080,2083],{"name":2081,"color":2082},"vitest-environment","b60205",{"name":2084,"color":2085},"needs reproduction","DE7793","test-utils","DataCloneError: (path) => path.replace(/^\\/oc/, '') could not be cloned","2023-12-05T11:42:33Z","https://github.com/nuxt/test-utils/issues/587",{"description":2091,"labels":2092,"number":2098,"owner":1988,"repository":1988,"state":2072,"title":2099,"updated_at":2100,"url":2101,"score":2102},"### Environment\n\n- Operating System: `Linux`\r\n- Node Version: `v16.15.0`\r\n- Nuxt Version: `3.0.0-rc.12-27730995.2894a75`\r\n- Nitro Version: `0.5.4-27726613.640c2b7`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `modules`, `components`, `runtimeConfig`, `experimental`, `app`, `pwa`\r\n- Runtime Modules: `@nuxtjs/tailwindcss@5.3.3`, `@vueuse/nuxt@9.2.0`, `@kevinmarrec/nuxt-pwa@0.4.2`\r\n- Build Modules: `-`\n\n### Reproduction\n\n1. Set `app.baseURL` to a custom base url in `nuxt.config.ts`\r\n2. Run `npx nuxi generate`\r\n3. Inspect `.output/public/index.html` and search for `/_payload.js` two instances should appear with no base url applied:\r\n 1. `\u003Clink rel=\"modulepreload\" href=\"/_payload.js\">`\r\n 2. `...import p from \"/_payload.js\";...`\r\n\r\n\n\n### Describe the bug\n\nBase url doesn't get applied when using `nuxi generate`. With `experimental.payloadExtraction` set to `false` it works fine.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2093,2096,2097],{"name":2094,"color":2095},"3.x","29bc7f",{"name":2002,"color":2003},{"name":2005,"color":2006},15023,"Base URL doesn't get applied to /_payload.js when using Nuxi Generate","2023-01-24T18:19:18Z","https://github.com/nuxt/nuxt/issues/15023",0.68900436,["Reactive",2104],{},["Set"],["ShallowReactive",2107],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"40Jh0-cDtEdu3WGp6N5EqLhjHNwmaH_1L7sc5dUCR3o":-1},"/nuxt/ui/2710"]