Skip to content

Vite >6.0.9 has CORS issue with laravel-vite #19239

Closed
@VOBradley

Description

@VOBradley

Describe the bug

After updating VITE to version 6.0.9 I get the following error when vite build

FULL ERROR:

error during build:
TypeError: Invalid URL
    at new URL (node:internal/url:796:36)
    at getAdditionalAllowedHosts (file:///C:/Users/vshchukin/Desktop/projects/ostore/ostore-api/node_modules/vite/dist/node/chunks/dep-BdTvomPN.js:37687:29)
    at resolveConfig (file:///C:/Users/vshchukin/Desktop/projects/ostore/ostore-api/node_modules/vite/dist/node/chunks/dep-BdTvomPN.js:53812:29)
    at async createBuilder (file:///C:/Users/vshchukin/Desktop/projects/ostore/ostore-api/node_modules/vite/dist/node/chunks/dep-BdTvomPN.js:51529:18)
    at async CAC.<anonymous> (file:///C:/Users/vshchukin/Desktop/projects/ostore/ostore-api/node_modules/vite/dist/node/cli.js:852:23)

Reproduction

https://o.kg

Steps to reproduce

set 6.0.9 vite version
npm install
npm run build

System Info

windows and ubuntu

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions