solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: crawl links doesn't work with solidjs Anchor component

Open OmarShref opened this issue 8 months ago • 0 comments

Duplicates

  • [x] I have searched the existing issues

Latest version

  • [x] I have tested the latest version

Current behavior 😯

  • trying the prerender feature at app.config.ts with crawl links equal to true not working

app.config.ts import { defineConfig } from "@solidjs/start/config"; export default defineConfig({ ssr: true, server: { prerender: { routes: ["/"], crawlLinks: true, }, } });

  • the link Im trying to prerender at build time is /about

index.tsx import { A } from "@solidjs/router"; export default function Index() { return ( <div> <p>hello omar</p> <A href="/about">about</A> </div> ); }

  • however when trying to use normal anchor component the route "/about" is prerendered correctly

index.tsx export default function Index() { return ( <div> <p>hello omar</p> <a href="/about">about</a> </div> ); }

Expected behavior 🤔

  • the expected behavior is that crawling should be working with solidjs anchor component sense it is just a wrapper around the normal anchor element

Steps to reproduce 🕹

Steps:

Context 🔦

  • my pakage.json { "name": "example-bare", "type": "module", "scripts": { "dev": "vinxi dev", "build": "vinxi build", "start": "vinxi start" }, "dependencies": { "@solidjs/router": "^0.15.3", "@solidjs/start": "^1.1.0", "@tailwindcss/vite": "^4.1.5", "router": "link:@solidjs/start/router", "solid-js": "^1.9.5", "tailwindcss": "^4.1.5", "vinxi": "^0.5.3" }, "engines": { "node": ">=22" } }

and im using file routes with folder called routes inside src and inside it two routes/files index.tsx and about.tsx

Your environment 🌎

macbook 3 pro 
tried with both npm and pnpm

OmarShref avatar May 01 '25 22:05 OmarShref