Skip to content

Make index.html available in the middleware #10

@egoist

Description

@egoist

It's common to use middleware to modify your index.html before sending it as the response: 🤔

import { indexHtml } from 'vite-vercel/server'

export default (req) => {
  const html = indexHtml.replace('<html>', '<html lang="en">')
  return new Response(html)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions