Skip to content

Static manifest.json file is overridden with generated file #5803

@CaptainCodeman

Description

@CaptainCodeman

Describe the bug

A manifest file added to the static folder i.e. /static/manifest.json is overwritten with a generated SvelteKit file at runtime (happens with adapter-node & adapter-auto).

Reproduction

Add /static/manifest.json file:

{
  "name": "test"
}

Build / run app, request /manifest.json, response is like:

{
  ".svelte-kit/runtime/client/start.js": {
    "file": "_app/immutable/start-1e83f480.js",
    "src": ".svelte-kit/runtime/client/start.js",
    "isEntry": true,
    "imports": [
      "_index-e11c2291.js",
      "_index-b191a7c7.js",
      "_singletons-eca981c1.js"
    ],
    "dynamicImports": [
      "src/routes/__layout.svelte",
      ".svelte-kit/runtime/components/error.svelte",
      "src/routes/folder/[...path]/__layout.svelte",
      "src/routes/about/index.svelte",
      "src/routes/cart/index.svelte",
      "src/routes/folder/[...path]/index.svelte",
      "src/routes/index.svelte",
      "src/routes/photo/[id].svelte"
    ]
  },
  ...

Logs

No response

System Info

System:
    OS: macOS 12.5
    CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
    Memory: 51.80 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.14.0 - /usr/local/bin/node
    npm: 8.3.1 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 102.1.39.111
    Chrome: 104.0.5112.79
    Chrome Canary: 106.0.5216.0
    Edge: 103.0.1264.77
    Firefox: 102.0.1
    Safari: 15.6
    Safari Technology Preview: 16.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.64 
    @sveltejs/adapter-node: next => 1.0.0-next.85 
    @sveltejs/kit: next => 1.0.0-next.401 
    svelte: ^3.49.0 => 3.49.0 
    vite: ^3.0.4 => 3.0.4

Severity

serious, but I can work around it

Additional Information

manifest.json is specifically mentioned as an example of using a static file:

assets — a place to put static files that should have stable URLs and undergo no processing, such as favicon.ico or manifest.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvite

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions