Skip to content

Build Hash For css not match when build using docker #5812

@killallskywalker

Description

@killallskywalker

Which project does this relate to?

Router

Describe the bug

Issue
When building a TanStack Start project normally (local build), the asset hashes are consistent and everything works as expected.

However, when building the same project inside a Docker container, there’s a mismatch in the hashed style assets. This causes a Flash of Unstyled Content (FOUC) on page load.

Your Example Website or App

https://github.com/killallskywalker/tanstack-reproduce-issue

Steps to Reproduce the Bug or Issue

  1. Go to this repository - https://github.com/killallskywalker/tanstack-reproduce-issue
  2. Run docker compose up
  3. Open localhost:3000 then you can see the mismatch and the FOUC

However , if you do this
1 . npm run build
2 . node .output/server/index.mjs
3 . Open localhost:3000 then you can see all work nicely

Expected behavior

The asset hashes and generated style files should be identical regardless of build environment (local vs Docker) and no FOUC

Screenshots or Videos

Docker Image -

Image

Local Build -

Image

Platform

  • Router / Start Version: [1.135.0]
  • Bundler: [vite]
  • Bundler Version: [7.2.2]
  • Nitro V2 Plugin [1.133.19]

Additional context

Step to reproduce also attach in readme of repo .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions