[{"data":1,"prerenderedAt":340,"buildId":341},["ShallowReactive",2],{"navigation_docs":3,"rule-content-\u002Fnuxt\u002Frules\u002Frouting\u002Fnavigate-to-external":104},[4,32,36,40,44,48,52,64,68,92,96,100],{"title":5,"path":6,"stem":7,"children":8,"icon":31},"CLI","\u002Fcli","1.cli\u002F1.index",[9,11,15,19,23,27],{"title":10,"path":6,"stem":7},"Run Doctor",{"title":12,"path":13,"stem":14},"Reports","\u002Fcli\u002Freports","1.cli\u002F2.reports",{"title":16,"path":17,"stem":18},"Configuration","\u002Fcli\u002Fconfiguration","1.cli\u002F3.configuration",{"title":20,"path":21,"stem":22},"CI and changed files","\u002Fcli\u002Fci","1.cli\u002F4.ci",{"title":24,"path":25,"stem":26},"Workspaces","\u002Fcli\u002Fworkspaces","1.cli\u002F5.workspaces",{"title":28,"path":29,"stem":30},"Cache and speed","\u002Fcli\u002Fcache","1.cli\u002F6.cache","i-lucide-terminal",{"title":33,"path":34,"stem":35},"Nuxt","\u002Fnuxt","2.nuxt",{"title":37,"path":38,"stem":39},"Vue","\u002Fvue","3.vue",{"title":41,"path":42,"stem":43},"Vite","\u002Fvite","4.vite",{"title":45,"path":46,"stem":47},"Nitro","\u002Fnitro","5.nitro",{"title":49,"path":50,"stem":51},"TypeScript","\u002Ftypescript","6.typescript",{"title":53,"path":54,"stem":55,"children":56,"icon":63},"Design system","\u002Fdesign-system","7.design-system\u002F1.index",[57,59],{"title":58,"path":54,"stem":55},"Overview",{"title":60,"path":61,"stem":62},"Classes and styles","\u002Fdesign-system\u002Fclasses","7.design-system\u002F2.classes","i-lucide-swatch-book",{"title":65,"path":66,"stem":67},"Package","\u002Fpackage","8.package",{"title":69,"path":70,"stem":71,"children":72,"icon":91},"Extending Doctor","\u002Fextending","9.extending\u002F1.index",[73,75,79,83,87],{"title":74,"path":70,"stem":71},"Write an extension",{"title":76,"path":77,"stem":78},"Visitors","\u002Fextending\u002Fvisitors","9.extending\u002F2.visitors",{"title":80,"path":81,"stem":82},"Ship with a library","\u002Fextending\u002Fshipping","9.extending\u002F3.shipping",{"title":84,"path":85,"stem":86},"Test a Rule","\u002Fextending\u002Ftesting","9.extending\u002F4.testing",{"title":88,"path":89,"stem":90},"Rule inputs","\u002Fextending\u002Frule-inputs","9.extending\u002F5.rule-inputs","i-lucide-puzzle",{"title":93,"path":94,"stem":95},"H3","\u002Fh3","9.h3",{"title":97,"path":98,"stem":99},"MCP","\u002Fmodel-context-protocol","9.model-context-protocol",{"title":101,"path":102,"stem":103},"Pinia","\u002Fpinia","9.pinia",{"id":105,"title":106,"body":107,"category":113,"description":327,"diagnosticCodes":328,"docsUrl":115,"extension":329,"fix":116,"framework":330,"meta":331,"navigation":332,"pack":117,"path":334,"recommendedReplacement":335,"ruleId":118,"seo":336,"severity":119,"source":120,"sourceUrl":121,"stem":337,"why":338,"__hash__":339},"rules\u002Fnuxt\u002Frules\u002Frouting\u002Fnavigate-to-external.md","Pass external: true to navigateTo for external URLs",{"type":108,"value":109,"toc":316},"minimark",[110,122,127,159,163,178,182,193,197,223,227,232,235,268,271,312],[111,112],"rule-metadata",{"category":113,"diagnosticCodes":114,"docsUrl":115,"fix":116,"pack":117,"ruleId":118,"severity":119,"source":120,"sourceUrl":121},"routing","NUXT0101","https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fapi\u002Futils\u002Fnavigate-to#external-url","suggestion","vite-doctor\u002Fnuxt","nuxt\u002Frouting\u002Fnavigate-to-external","error","src\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fnavigate-to-external.ts","https:\u002F\u002Fgithub.com\u002Fwords-with-agents\u002Fvite-doctor\u002Fblob\u002Fmain\u002Fsrc\u002Frule-packs\u002Fnuxt\u002Frules\u002Fnuxt\u002Fnavigate-to-external.ts",[123,124,126],"h2",{"id":125},"run-this-rule","Run this rule",[128,129,134],"pre",{"className":130,"code":131,"language":132,"meta":133,"style":133},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm nuxt doctor --rules nuxt\u002Frouting\u002Fnavigate-to-external\n","bash","",[135,136,137],"code",{"__ignoreMap":133},[138,139,142,146,150,153,156],"span",{"class":140,"line":141},"line",1,[138,143,145],{"class":144},"sBMFI","pnpm",[138,147,149],{"class":148},"sfazB"," nuxt",[138,151,152],{"class":148}," doctor",[138,154,155],{"class":148}," --rules",[138,157,158],{"class":148}," nuxt\u002Frouting\u002Fnavigate-to-external\n",[123,160,162],{"id":161},"why-it-matters","Why it matters",[164,165,166,169,170,173,174,177],"p",{},[135,167,168],{},"navigateTo"," treats a target as external when ufo's ",[135,171,172],{},"hasProtocol(toPath, { acceptRelative: true })"," matches it, and throws instead of navigating unless the options set ",[135,175,176],{},"external: true",". The call fails at runtime with NUXT_E2001, \"Navigating to external URL is not allowed by default\", on the server and in the browser.",[123,179,181],{"id":180},"recommended-fix","Recommended fix",[164,183,184,185,188,189,192],{},"Pass ",[135,186,187],{},"{ external: true }"," as the second argument. To open the URL in a new tab, pass ",[135,190,191],{},"{ open: { target: '_blank' } }"," instead.",[123,194,196],{"id":195},"useful-links","Useful links",[198,199,200,209,216],"ul",{},[201,202,203],"li",{},[204,205,208],"a",{"href":115,"rel":206},[207],"nofollow","Rule reference",[201,210,211],{},[204,212,215],{"href":213,"rel":214},"https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fapi\u002Futils\u002Fnavigate-to",[207],"Nuxt navigateTo",[201,217,218],{},[204,219,222],{"href":220,"rel":221},"https:\u002F\u002Fnuxt.com\u002Fdocs\u002F4.x\u002Fgetting-started\u002Frouting",[207],"Nuxt routing",[123,224,226],{"id":225},"example","Example",[228,229,231],"h3",{"id":230},"allow-the-external-navigation","Allow the external navigation",[164,233,234],{},"Before",[128,236,240],{"className":237,"code":238,"language":239,"meta":133,"style":133},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","await navigateTo('https:\u002F\u002Fexample.com\u002Flogin')\n","ts",[135,241,242],{"__ignoreMap":133},[138,243,244,248,252,256,260,263,265],{"class":140,"line":141},[138,245,247],{"class":246},"s7zQu","await",[138,249,251],{"class":250},"s2Zo4"," navigateTo",[138,253,255],{"class":254},"sTEyZ","(",[138,257,259],{"class":258},"sMK4o","'",[138,261,262],{"class":148},"https:\u002F\u002Fexample.com\u002Flogin",[138,264,259],{"class":258},[138,266,267],{"class":254},")\n",[164,269,270],{},"After",[128,272,274],{"className":237,"code":273,"language":239,"meta":133,"style":133},"await navigateTo('https:\u002F\u002Fexample.com\u002Flogin', { external: true })\n",[135,275,276],{"__ignoreMap":133},[138,277,278,280,282,284,286,288,290,293,296,300,303,307,310],{"class":140,"line":141},[138,279,247],{"class":246},[138,281,251],{"class":250},[138,283,255],{"class":254},[138,285,259],{"class":258},[138,287,262],{"class":148},[138,289,259],{"class":258},[138,291,292],{"class":258},",",[138,294,295],{"class":258}," {",[138,297,299],{"class":298},"swJcz"," external",[138,301,302],{"class":258},":",[138,304,306],{"class":305},"sfNiH"," true",[138,308,309],{"class":258}," }",[138,311,267],{"class":254},[313,314,315],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":133,"searchDepth":317,"depth":317,"links":318},2,[319,320,321,322,323],{"id":125,"depth":317,"text":126},{"id":161,"depth":317,"text":162},{"id":180,"depth":317,"text":181},{"id":195,"depth":317,"text":196},{"id":225,"depth":317,"text":226,"children":324},[325],{"id":230,"depth":326,"text":231},3,"Finds `navigateTo()` calls whose target is a string literal with a protocol, such as `https:\u002F\u002F` or `mailto:`, or a protocol-relative `\u002F\u002F` URL, and no `{ external: true }`. Template literals and `+` concatenations count when their leading literal text already makes the URL external. Calls with `open`, spread options, or a computed `external` value are not reported, nor are `navigateTo` bindings that do not come from Nuxt.",[114],"md","nuxt",{},{"title":333},"External navigateTo","\u002Fnuxt\u002Frules\u002Frouting\u002Fnavigate-to-external","Pass `{ external: true }` as the second argument. To open the URL in a new tab, pass `{ open: { target: '_blank' } }` instead.",{"title":106,"description":327},"nuxt\u002Frules\u002Frouting\u002Fnavigate-to-external","`navigateTo` treats a target as external when ufo's `hasProtocol(toPath, { acceptRelative: true })` matches it, and throws instead of navigating unless the options set `external: true`. The call fails at runtime with NUXT_E2001, \"Navigating to external URL is not allowed by default\", on the server and in the browser.","rdsVP2YVTnAU1LMnX9uavoYNDGwSiIj9H3lEpviX7MQ",1796507766672,"e745db9b-2064-477e-b678-8c0a05edc39c"]