Skip to content

Conversation

simiajani
Copy link

@simiajani simiajani commented Oct 6, 2025

…(#32142)

Description

This PR updates the resource check login in packages/gatsby/cache-dir/loader.js to include the pathPrefix when resolving resources. Without this, sites configured with a custom pathPrefix could trigger 404 errors and React crashes during client-side navigation.

Documentation

This change does not affect public APIs or require new documentation. It simply ensures correct path handling in existing resource resolution logic.

Tests

  • Verified that pages load successfully with a pathPrefix configured in gatsby-config.js.
  • Confirmed that non-prefixed builds continue to function as expected.
  • Ran existing test suite to ensure no regressions.

Related Issues

Fixes #32142

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page 404 not rendering react when using pathPrefix and redirect

1 participant