Skip to content

ReferenceError when using prefetchAll in config #15836

@Proxy-alt

Description

@Proxy-alt

Astro Info

Astro                    v6.0.2
Vite                     v7.3.1
Node                     v24.13.1
System                   Linux (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

Chrome and unsure, haven't tested in other browsers

Describe the Bug

astro_virtual-modules_prefetch__js.js?v=e100bd4e:9 Uncaught ReferenceError: __PREFETCH_PREFETCH_ALL__ is not defined
    at astro_virtual-modules_prefetch__js.js?v=e100bd4e:9:19
(anonymous) @ astro_virtual-modules_prefetch__js.js?v=e100bd4e:9

When using the config option: prefetch: { prefetchAll: true },

What's the expected result?

What is expected to happen is that Astro prefetches all links on the current page

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-jde9hjiq

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)pkg: astroRelated to the core `astro` package (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions