Tangible Bytes

A Web Developer’s Blog

2025 Archive

Posts from 2025

Laravel Vite Wont Serve Build Files

This is a silly one.

I wanted to run Laravel in dev mode but using the compiled js and scss from npm run build via vitejs.

This usually works

but for some reason Laravel was trying to serve js/css from http://localhost:5173/@vite/client

a service I usually run - but I wanted to test the build stuff.

The solution is really simple but not well documented.

Read more ...

Vitest Partial Mock InertiaJs

I have a Laravel project using vite InertiaJS and React

A unit test calling the Head module from @inertiajs/react

Was triggering this error

Cannot read properties of undefined (reading 'createProvider')

For this test I don’t really care about the Head module - but didn’t want to try and mock the whole of inertia-react

Read more ...