Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

michael1986's avatar

Laravel Vapor upload issue using Vite in production mode

I've implemented the laravel vapor npm package:

npm i laravel-vapor

Imported it in my app.js

import Vapor from 'laravel-vapor';
window.Vapor = Vapor;

Using Vite 5 in develop mode, everything works just fine. Files are being stored at S3. When running npm run build (production mode), I run into an issue while trying to upload files:

Upload failed TypeError: Vp.default.post is not a function

Can somebody please give me a push in the right direction?

0 likes
3 replies
Aldrindelacruz's avatar

@ghabe That exactly how it was been used, its working on dev build(run dev) but when you build the assets(using vite, build for prod) its start to become an issue.

Please or to participate in this conversation.