Skip to content

[Bug]: disableHtmlFolder is not used in the vercel's config.json deploy file #8209

@giancarlosisasi

Description

@giancarlosisasi

Version

System:
    OS: macOS 26.1
    CPU: (12) arm64 Apple M4 Pro
    Memory: 207.86 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Brave Browser: 143.1.85.120
    Chrome: 143.0.7499.193
    Safari: 26.1
  npmPackages:
    @modern-js/app-tools: 2.70.2 => 2.70.2 
    @modern-js/runtime: 2.70.2 => 2.70.2

Details

Context: i'm deploy a modernjs app in Vercel

The config disableHtmlFolder is not being used when generating the .vercel/output/config.json.

if I have this:

   html: {
      disableHtmlFolder: true,
    },

the file (.vercel/output/config.json) is generated like

{
  "version": 3,
  "routes": [
    {
      "src": "/static/(.*)",
      "headers": {
        "cache-control": "s-maxage=31536000, immutable"
      },
      "continue": true
    },
    {
      "handle": "filesystem"
    },
    {
      "src": "/(?:/.*)?",
      "headers": {
        "cache-control": "s-maxage=0"
      },
      "dest": "/html/main/index.html" // <---- here is the problem
    }
  ]
}

The last part "dest": "/html/main/index.html" should be "dest": "/html/main.html" when html.disableHtmlFolder is true

I think the line that needs to be changed is here:

dest: `/html/${entry.entryName}/index.html`,

Reproduce link

dest: `/html/${entry.entryName}/index.html`,

Reproduce Steps

  1. Configure html.disableHtmlFolder to true
  2. Run MODERNJS_DEPLOY=vercel npm modern deploy
  3. Go to .vercel/output/config.json

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