\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.7034393,{"description":2874,"labels":2875,"number":2876,"owner":2866,"repository":2867,"state":2868,"title":2877,"updated_at":2878,"url":2879,"score":2880},"When I open a e.g. a modal where one of these icons is displayed, often the modal opens and the icon is not ready. It loads and pops up after 1-2 seconds which can irritate overall look of the webpage.\n\n**Any ideas how to speed up the loading time or how to initiate a pre-render of the icon?**\n\n(Mark: I code the website as a pwa, so I want to let the page feel like a native app as best as possible.)",[],381,"Any way to speed up loading time of an icon?","2025-03-28T09:22:58Z","https://github.com/nuxt/icon/issues/381",0.7163952,{"labels":2882,"number":2892,"owner":2866,"repository":2866,"state":2893,"title":2894,"updated_at":2895,"url":2896,"score":2897},[2883,2886,2889],{"name":2884,"color":2885},"3.x","29bc7f",{"name":2887,"color":2888},"pending triage","E99695",{"name":2890,"color":2891},"needs reproduction","FBCA04",14451,"closed","createTest from @nuxt/test-utils-edge can't load nuxt","2023-01-19T17:35:34Z","https://github.com/nuxt/nuxt/issues/14451",0.69541925,{"description":2899,"labels":2900,"number":2904,"owner":2866,"repository":2905,"state":2893,"title":2906,"updated_at":2907,"url":2908,"score":2909},"When I tried to use the library I got this error: \r\n\r\n\r\nIf I only use jest or testing library they do work, I am quite confused. Any ideas?\r\n\r\nThis is my jest.config.js:\r\n```\r\nmodule.exports = {\r\n moduleNameMapper: {\r\n '^@/(.*)$': '\u003CrootDir>/$1',\r\n '^~/(.*)$': '\u003CrootDir>/$1',\r\n '^@atoms/(.*)$': '\u003CrootDir>/components/common/atoms/$1',\r\n '^@molecules/(.*)$': '\u003CrootDir>/components/common/molecules/$1',\r\n '^@organisms/(.*)$': '\u003CrootDir>/components/common/organisms/$1',\r\n '^@checkout/(.*)$': '\u003CrootDir>/components/private/checkout/$1',\r\n '^vue$': 'vue/dist/vue.common.js'\r\n },\r\n moduleFileExtensions: ['js', 'vue', 'json'],\r\n transform: {\r\n '^.+\\\\.js$': 'babel-jest',\r\n '.*\\\\.(vue)$': 'vue-jest'\r\n },\r\n collectCoverage: true,\r\n transformIgnorePatterns: [\r\n 'node_modules/(?!(nuxt-i18n)/)',\r\n 'node_modules/(?!(nuxt-webfontloader)/)',\r\n 'node_modules/(?!(nuxt-test-utils)/)'\r\n ],\r\n testEnvironment: 'jsdom',\r\n preset: '@nuxt/test-utils'\r\n}\r\n\r\n\r\n```\r\nThis is my package.json:\r\n```\r\n \"dependencies\": {\r\n \"@adyen/adyen-web\": \"^4.2.3\",\r\n \"@bugsnag/js\": \"^7.1.1\",\r\n \"@bugsnag/plugin-vue\": \"^7.1.1\",\r\n \"@nuxtjs/axios\": \"^5.3.6\",\r\n \"@nuxtjs/dayjs\": \"^1.3.0\",\r\n \"@nuxtjs/gtm\": \"^2.3.2\",\r\n \"@nuxtjs/pwa\": \"^3.3.5\",\r\n \"@nuxtjs/router\": \"^1.5.0\",\r\n \"@nuxtjs/svg-sprite\": \"^0.4.10\",\r\n \"@tailwindcss/aspect-ratio\": \"^0.2.0\",\r\n \"@tailwindcss/forms\": \"^0.3.2\",\r\n \"@tailwindcss/typography\": \"^0.4.0\",\r\n \"cookie-universal-nuxt\": \"^2.1.4\",\r\n \"core-js\": \"^2.6.0\",\r\n \"cross-env\": \"^5.2.0\",\r\n \"dotenv\": \"^8.2.0\",\r\n \"eslint-loader\": \"^4.0.2\",\r\n \"express\": \"^4.16.4\",\r\n \"jsdom\": \"^16.4.0\",\r\n \"lozad\": \"^1.15.0\",\r\n \"node-fetch\": \"^2.6.1\",\r\n \"nuxt\": \"2.15.4\",\r\n \"nuxt-feature-toggle\": \"^1.0.1\",\r\n \"nuxt-font-loader-strategy\": \"^1.1.1\",\r\n \"nuxt-i18n\": \"^6.15.4\",\r\n \"nuxt-jsonld\": \"^1.4.10\",\r\n \"nuxt-webfontloader\": \"^1.1.0\",\r\n \"v-click-outside\": \"^3.0.1\",\r\n \"v-clipboard\": \"^2.2.3\",\r\n \"vue-debounce\": \"^2.5.6\",\r\n \"vue-glide-js\": \"^1.3.14\",\r\n \"vue-gtm\": \"^2.3.1\",\r\n \"vue-slider-component\": \"^3.1.4\",\r\n \"vue-social-sharing\": \"^3.0.0-beta.11\",\r\n \"vue-toastification\": \"^1.7.6\",\r\n \"vue-vimeo-player\": \"^0.1.0\",\r\n \"vuelidate\": \"^0.7.5\"\r\n },\r\n \"devDependencies\": {\r\n \"@babel/core\": \"^7.7.7\",\r\n \"@babel/preset-env\": \"^7.15.0\",\r\n \"@babel/plugin-transform-runtime\": \"^7.15.0\",\r\n \"@nuxt/test-utils\": \"^0.2.2\",\r\n \"@nuxtjs/eslint-config\": \"^5.0.0\",\r\n \"@nuxtjs/eslint-module\": \"^3.0.1\",\r\n \"@nuxtjs/tailwindcss\": \"^4.1.2\",\r\n \"@testing-library/vue\": \"^5.8.2\",\r\n \"@vue/test-utils\": \"^1.1.2\",\r\n \"babel-eslint\": \"^10.0.1\",\r\n \"babel-jest\": \"26\",\r\n \"eslint\": \"^7.14.0\",\r\n \"eslint-config-prettier\": \"^6.15.0\",\r\n \"eslint-plugin-nuxt\": \"^2.0.0\",\r\n \"eslint-plugin-prettier\": \"^3.1.4\",\r\n \"jest\": \"26\",\r\n \"node-sass\": \"^4.14.1\",\r\n \"nodemon\": \"^1.18.9\",\r\n \"playwright\": \"^1.14.1\",\r\n \"postcss\": \"^8.2.9\",\r\n \"prettier\": \"^1.19.1\",\r\n \"sass-loader\": \"10.1.1\",\r\n \"vue-jest\": \"^4.0.0-rc.1\"\r\n }\r\n}\r\n```\r\n\r\n\r\nMy .babelrc: \r\n```\r\n{\r\n \"env\": {\r\n \"test\": {\r\n \"presets\": [\r\n [\r\n \"@babel/preset-env\",\r\n {\r\n \"targets\": {\r\n \"node\": \"current\"\r\n }\r\n }\r\n ]\r\n ]\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\nI am trying to use this test: \r\n\r\n`import { createPage, setupTest } from '@nuxt/test-utils'`\r\n\r\n`describe('browser', () => {`\r\n `setupTest({ browser: true })`\r\n\r\n ` it('renders the index page', async () => {`\r\n ` const page = await createPage('/')`\r\n ` const html = await page.innerHTML('body')`\r\n\r\n ` expect(html).toContain('Something')`\r\n` })`\r\n`})`\r\n\r\n",[2901],{"name":2902,"color":2903},"v0","4137F6",320,"test-utils","\"Cannot use import statement outside a module\" when i use setupTest","2024-05-23T20:19:27Z","https://github.com/nuxt/test-utils/issues/320",0.70114285,{"labels":2911,"number":2919,"owner":2866,"repository":2866,"state":2893,"title":2920,"updated_at":2921,"url":2922,"score":2923},[2912,2913,2916],{"name":2884,"color":2885},{"name":2914,"color":2915},"bug","d73a4a",{"name":2917,"color":2918},"components","05B979",12985,"Test files are bundled into production builds","2023-01-19T16:39:56Z","https://github.com/nuxt/nuxt/issues/12985",0.7025999,{"description":2925,"labels":2926,"number":2927,"owner":2866,"repository":2905,"state":2893,"title":2928,"updated_at":2929,"url":2930,"score":2931},"Originally reported by nuxt/test-utils#329, when having multiple `.test` files, jest runs them in parallel. If two depending on a single fixture and need build, this causes issues. Some options are:\r\n\r\n- Using run-in-band to disable parallel run\r\n- Using a lock-file so one test awaits on others during build\r\n- Using random build ids for `buildDir`\r\n- Using mfs (#49) for building in mem (considering all internals can support)\r\n\r\n",[],318,"fix: build conflict between multiple tests","2023-12-02T00:13:07Z","https://github.com/nuxt/test-utils/issues/318",0.7029469,{"description":2933,"labels":2934,"number":2935,"owner":2866,"repository":2905,"state":2893,"title":2936,"updated_at":2937,"url":2938,"score":2872},"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":2933,"labels":2940,"number":2865,"owner":2866,"repository":2905,"state":2893,"title":2936,"updated_at":2941,"url":2942,"score":2872},[],"2023-12-02T00:13:09Z","https://github.com/nuxt/test-utils/issues/380",{"description":2933,"labels":2944,"number":2945,"owner":2866,"repository":2905,"state":2893,"title":2936,"updated_at":2946,"url":2947,"score":2872},[],481,"2023-12-02T00:13:13Z","https://github.com/nuxt/test-utils/issues/481",{"labels":2949,"number":2955,"owner":2866,"repository":2866,"state":2893,"title":2956,"updated_at":2957,"url":2958,"score":2959},[2950,2953,2954],{"name":2951,"color":2952},"enhancement","8DEF37",{"name":2884,"color":2885},{"name":2914,"color":2915},14159,"implement `setupTimeout` option in test-utils","2023-01-19T17:26:34Z","https://github.com/nuxt/nuxt/issues/14159",0.7134104,["Reactive",2961],{},["Set"],["ShallowReactive",2964],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f_1KSWdJ2ONafGWaZT0eiAMbTJoRSvBl9sggpp8-SHP0":-1},"/nuxt/test-utils/329"]