\n\u003C!-- OR -->\n\u003CIcon name=\"my-icon:a\" v-if=\"flag\" />\n\u003CIcon name=\"my-icon:b\" v-else />\n```\nin `nuxt.config.ts`\n```ts\nicon: {\n provider: 'server',\n customCollections: [\n {\n prefix: 'my-icon',\n dir: './assets/icon/svg',\n },\n ],\n},\n// ...\nnitro: {\n preset: 'static',\n},\n```\n\nIf toggle value of `flag`, \neverything works well in development, \nbut it throws 404 error for `my-icon:b` after building and generating.\n(it works well with `v-show`) \n\nProject info:\n```\n------------------------------\n- Operating System: Windows_NT\n- Node Version: v22.8.0\n- Nuxt Version: 3.16.0\n- CLI Version: 3.23.0\n- Nitro Version: 2.11.6\n- Package Manager: pnpm@9.9.0\n- Builder: -\n- User Config: modules, icon, colorMode, shadcn, fonts, googleSignIn, app, imports, css, vite, nitro, compatibilityDate, telemetry\n- Runtime Modules: @nuxtjs/tailwindcss@6.13.2, @nuxt/icon@1.11.0, @nuxt/fonts@0.11.0, @nuxt/image@1.9.0, @nuxt/eslint@1.2.0, @pinia/nuxt@0.10.1, pinia-plugin-persistedstate/nuxt@4.2.0, @nuxt/test-utils/module@3.17.2, @nuxtjs/color-mode@3.5.2, shadcn-nuxt@1.0.3, @vueuse/nuxt@13.0.0, nuxt-vue3-google-signin@0.0.11\n- Build Modules: -\n------------------------------\n```\n",[],380,"nuxt","icon","open","Local icon 404 after `nuxi generating` if with `:name=\"flag?'my-icon:icon-a':'my-icon:icon-b'\"`","2025-03-26T15:31:52Z","https://github.com/nuxt/icon/issues/380",0.67591006,{"description":1993,"labels":1994,"number":2004,"owner":1985,"repository":1985,"state":1987,"title":2005,"updated_at":2006,"url":2007,"score":2008},"### Discussed in https://github.com/nuxt/nuxt/discussions/25825\r\n\r\n\u003Cdiv type='discussions-op-text'>\r\n\r\n\u003Csup>Originally posted by **lna1989** February 16, 2024\u003C/sup>\r\n'1.testPlugin.ts' plugin in the layer connected via an auto import and '1.testPlugin.ts' in App. layers connected to app in nuxt.config.ts.\r\n\r\nDemo: https://stackblitz.com/edit/nuxt-starter-2r7whv?file=nuxt.config.ts\r\n\r\n./layer/plugins/1.testPlugin.ts:\r\n```javascript\r\nimport { defineNuxtPlugin } from '#imports'\r\n\r\nexport default defineNuxtPlugin((nuxtApp) => {\r\n console.log('Layer testPlugin.ts')\r\n})\r\n```\r\n\r\n./plugins/1.testPlugin.ts:\r\n```javascript\r\nimport { defineNuxtPlugin } from '#imports'\r\n\r\nexport default defineNuxtPlugin((nuxtApp) => {\r\n console.log('App testPlugin.ts')\r\n})\r\n```\r\n\r\n\r\nThe expected result: We see one message (\"App testPlugin.ts'\") from the App plugin in the console.\r\nThe actual result: We see two messages (\"Layer testPlugin.ts'\" and \"'App testPlugin.ts'\") in the console from both the layers plugin and the app.\u003C/div>",[1995,1998,2001],{"name":1996,"color":1997},"enhancement","8DEF37",{"name":1999,"color":2000},"🍰 p2-nice-to-have","0E8A16",{"name":2002,"color":2003},"layers","006B75",27047,"How override plugins from Nuxt Layer in app?","2024-10-22T06:58:41Z","https://github.com/nuxt/nuxt/issues/27047",0.6918828,{"description":2010,"labels":2011,"number":2012,"owner":1985,"repository":2013,"state":2014,"title":2015,"updated_at":2016,"url":2017,"score":2018},"Right now the docs has a quite limitation and there is no guidance on integrating with a full Nuxt app which contains pages with may api calls, not just plugin or components let alone ts module import.\r\n\r\nIt would be much appreciated if you can expand the docs on for a more specific cases or may be some examples on this repo or say a fiddle, codepen, codesandbox ?",[],265,"test-utils","closed","more docs on how to mock test for a page","2023-12-02T00:18:11Z","https://github.com/nuxt/test-utils/issues/265",0.6336995,{"description":2010,"labels":2020,"number":2021,"owner":1985,"repository":2013,"state":2014,"title":2015,"updated_at":2022,"url":2023,"score":2018},[],355,"2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/355",{"description":2025,"labels":2026,"number":2030,"owner":1985,"repository":1985,"state":2014,"title":2031,"updated_at":2032,"url":2033,"score":2034},"Hello, \r\n\r\nI'm thinking about creating a module providing some testing configuration. The plugin would work with [Jest](https://facebook.github.io/jest), allowing to unit test components, vuex stores, plugins… The whole configuration will be already done, and developers would just have to include it.\r\n\r\nBut, before getting started, I'd like some information :\r\n\r\n1. Is such plugin welcome ? Or do you plan to support testing natively in Nuxt ?\r\n1. The plugin would provide a testing script, is it possible from a module to extend the Nuxt scripts (And provide `nuxt test` for exemple) ?\r\n\r\nFor now, I implemented some testing setup here : https://github.com/antoinerey/nuxt-jest\r\n\r\n**Edit**: The more I think about it, the more I feel like it'd be better to make a vue-cli plugin. What do you think ?\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/c2610\">#c2610\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2027],{"name":2028,"color":2029},"2.x","d4c5f9",3013,"Testing module","2023-01-18T16:09:51Z","https://github.com/nuxt/nuxt/issues/3013",0.6485499,{"description":2036,"labels":2037,"number":2044,"owner":1985,"repository":1985,"state":2014,"title":2045,"updated_at":2046,"url":2047,"score":2048},"### Describe the feature\r\n\r\nAfter reading [Testing-Get started docs](https://nuxt.com/docs/getting-started/testing#unit-testing) I had confusion on whether I could use the already existing `@vue/test-utils`. I was able to do it after following a guide I found online and it worked just fine.\r\n\r\nI wanted to raise this topic and ask if you think it would be useful to also add a section on how to set this in a new Nuxt 3 project? Was thinking just a basic step-by-step process on how to add `@vue/test-utils`, `vitest` and `happy-dom` and spin up a simple Unit test.\r\n\r\nI know we already have `@nuxt/test-utils` but in some old projects it might be useful to also have a short guide on `@vue/test-utils`. What do you think?\r\n\r\n### Additional information\r\n\r\n- [X] Would you be willing to help implement this feature?\r\n- [ ] Could this feature be implemented as a module?\r\n\r\n### Final checks\r\n\r\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\r\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2038,2041],{"name":2039,"color":2040},"documentation","5319e7",{"name":2042,"color":2043},"3.x","29bc7f",26178,"Docs: Add @vue/test-utils example in Getting started with Unit testing","2024-04-19T14:16:01Z","https://github.com/nuxt/nuxt/issues/26178",0.66648066,{"description":2050,"labels":2051,"number":2052,"owner":1985,"repository":2013,"state":2014,"title":2053,"updated_at":2054,"url":2055,"score":1991},"Example in https://test-utils.nuxtjs.org/api-reference/app-testing not working. \r\nAfter run test get error:\r\n\r\n```\r\n/firsttest.spec.js:1\r\n({\"Object.\u003Canonymous>\":function(module,exports,require,__dirname,__filename,global,jest){import { get, setupTest } from '@nuxt/test-utils';\r\n\r\nSyntaxError: Cannot use import statement outside a module\r\n```\r\nmy setup:\r\n\r\nin jest.config.js\r\n```\r\nmodule.exports = {\r\n clearMocks: true,\r\n testMatch: [\r\n '*/__tests__/**/*.[jt]s?(x)',\r\n '**/?(*.)+(spec|test).[tj]s?(x)',\r\n '**/test/(*.)+(spec|test).js'],\r\n moduleNameMapper: {\r\n '^@/(.*)$': '\u003CrootDir>/$1',\r\n '^~/(.*)$': '\u003CrootDir>/$1',\r\n },\r\n moduleFileExtensions: ['js', 'vue', 'json'],\r\n testEnvironment: 'jsdom',\r\n transform: {\r\n '^.+\\\\.js$': 'babel-jest',\r\n '.*\\\\.(vue)$': 'vue-jest',\r\n },\r\n preset: '@nuxt/test-utils',\r\n}\r\n```\r\nin package.json\r\n```\r\n{\r\n \"name\": \"\",\r\n \"version\": \"1.0.0\",\r\n \"main\": \"index.js\",\r\n \"scripts\": {\r\n \"test\": \"node_modules/.bin/jest\"\r\n },\r\n \"author\": \"\",\r\n \"license\": \"\",\r\n \"dependencies\": {\r\n \"bootstrap\": \"^4.5.3\",\r\n \"bootstrap-vue\": \"^2.20.1\",\r\n \"nuxt\": \"^2.15.2\",\r\n\r\n },\r\n \"devDependencies\": {\r\n \"@babel/plugin-transform-modules-commonjs\": \"^7.12.1\",\r\n \"@nuxt/test-utils\": \"^0.2.0\",\r\n \"@vue/test-utils\": \"^1.1.1\",\r\n \"babel-jest\": \"^26.6.3\",\r\n \"jest\": \"^26.6.3\",\r\n \"vue-jest\": \"^3.0.7\"\r\n }\r\n}\r\n\r\n```\r\n\r\n\r\n",[],267,"Example in https://test-utils.nuxtjs.org/api-reference/app-testing not working","2023-12-02T00:28:12Z","https://github.com/nuxt/test-utils/issues/267",{"description":2050,"labels":2057,"number":1984,"owner":1985,"repository":2013,"state":2014,"title":2053,"updated_at":2022,"url":2058,"score":1991},[],"https://github.com/nuxt/test-utils/issues/380",{"description":2050,"labels":2060,"number":2061,"owner":1985,"repository":2013,"state":2014,"title":2053,"updated_at":2062,"url":2063,"score":1991},[],481,"2023-12-02T00:13:13Z","https://github.com/nuxt/test-utils/issues/481",{"labels":2065,"number":2068,"owner":1985,"repository":1985,"state":2014,"title":2069,"updated_at":2070,"url":2071,"score":2072},[2066,2067],{"name":2039,"color":2040},{"name":2042,"color":2043},14624,"Documentation Improvement: nuxtApp, useNuxtApp, composables, plugins","2023-02-08T15:59:24Z","https://github.com/nuxt/nuxt/issues/14624",0.679067,["Reactive",2074],{},["Set"],["ShallowReactive",2077],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"xpTMBvnweQXnUm2TN7CjZPixIrJCpIYshmqH4GYsBlA":-1},"/nuxt/test-utils/313"]