Skip to content

staticServerFnCache files are not copied into nitro's build output #5368

@Ugzuzg

Description

@Ugzuzg

Which project does this relate to?

Start

Describe the bug

Feeding the build to nitro, the files generated by static middleware are not copied/moved into nitro's output directory, which results in missing assets.

Your Example Website or App

Ugzuzg/personal-space#21

Steps to Reproduce the Bug or Issue

  1. pnpm i

  2. cd website

  3. pnpm build

  4. See the static cache remain in dist, while the rest of the files are moved to .vercel output directory

    Directory structure
    .vercel
    └── output
        ├── config.json
        ├── functions
        │   └── __fallback.func
        │       ├── chunks
        │       │   └── build
        │       │       ├── _lang-DX_L9eJ9.mjs
        │       │       ├── _tanstack-start-injected-head-scripts_v-cda0Ky0D.mjs
        │       │       ├── _tanstack-start-manifest_v-CNom_Ozw.mjs
        │       │       ├── _tanstack-start-server-fn-manifest_v-BrhI4g-H.mjs
        │       │       ├── _userId-Dj_Tj9Fe.mjs
        │       │       ├── _userId-kd0zrFRz.mjs
        │       │       ├── be-MvRVzafA.mjs
        │       │       ├── en-C-d1pEbH.mjs
        │       │       ├── index-BBXWluvB.mjs
        │       │       ├── index-BId5N5dN.mjs
        │       │       ├── index-Bke3d4hG.mjs
        │       │       ├── index-BKOnOhxk.mjs
        │       │       ├── index-BZ5inV0x.mjs
        │       │       ├── index-DS2MZ0Bj.mjs
        │       │       ├── index-FRuXxEDb.mjs
        │       │       ├── node-fetch-BxoFFTNH.mjs
        │       │       ├── resoling-5HzRyWK_.mjs
        │       │       ├── resoling-D03YL1x9.mjs
        │       │       ├── router-DI3DXcLo.mjs
        │       │       ├── server.mjs
        │       │       ├── start-HYkvq4Ni.mjs
        │       │       ├── sv-BPDx4UA1.mjs
        │       │       └── Timeline-_493Qx2R.mjs
        │       ├── index.mjs
        │       └── site.webmanifest
        └── static
            ├── assets
            │   ├── _lang-Dm1RHZLI.js
            │   ├── _userId-PHk5CQL0.js
            │   ├── app-CyaCLMhk.css
            │   ├── be-DlU38kj2.js
            │   ├── be-gpt-GDw_wMCQ.png
            │   ├── en-D9OWq22V.js
            │   ├── en-gpt-rjd22bTK.png
            │   ├── index-Cazi3-Z7.js
            │   ├── index-ez0J8aTt.js
            │   ├── index-zz-yTDf-.js
            │   ├── main-jBb1es-6.js
            │   ├── resoling-By5dIrLM.js
            │   ├── scheme-ikcQt6G9.css
            │   ├── sv-DJE6P97R.js
            │   └── sv-gpt-CFVxReZj.png
            ├── be
            │   ├── climbing
            │   │   └── 56689.html
            │   ├── climbing.html
            │   └── resoling.html
            ├── be.html
            ├── en
            │   ├── climbing
            │   │   └── 56689.html
            │   ├── climbing.html
            │   └── resoling.html
            ├── en.html
            ├── pages.json
            ├── site.webmanifest
            ├── sitemap.xml
            ├── sv
            │   ├── climbing
            │   │   └── 56689.html
            │   ├── climbing.html
            │   └── resoling.html
            └── sv.html
    dist
    └── client
        └── __tsr
            └── staticServerFnCache
                ├── 6a55025c65a277d8e016dfd30acf1de9d8c80727.json
                └── 35c7a19a2fd3e1282b0b45fc683949ede6d30c48.json

Expected behavior

Static middleware works with nitro.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.132.36
  • OS: Linux
  • Bundler: vite
  • Bundler Version: 7.1.7

Additional context

No response

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