Skip to content

Using Vite version 4.5.9 or higher stops the Fern UI from working since the servers are not explictly listed. #36

@cwrm56

Description

@cwrm56

Deployed to dev server and got the error

Blocked request. This host ("<url redacted>") is not allowed.
To allow this host, add "<url redacted>" to preview.allowedHosts in vite.config.js.

This appears to be because the version of Vite got bumped from 4.5.5 to 4.5.9 so we picked up the fix vitejs/vite#19246.

This is now requiring the following:

export default defineConfig({
  preview: {
    allowedHosts: [
      "<url redacted>"
    ]
  }
});

For now we have locked Vite to version 4.5.5. We should allow minor and patch versions of Vite, and take care of specifying allowed hosts.

Before doing this, check to see if it is practical to jump to version 6 of Vite.

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