vite 사용하는 laravel 환경에서 pest 돌릴때 Vite manifest not found at 에러 해결하기

Updated on

vite 를 사용하는 laravel 환경에 pest 를 돌릴때, Vite manifest not found at 에러가 발생하는 경우가 있다.

이때에는 Vite를 비활성화 해야한다.

/tests/TestCase.php 파일에 아래 내용을 추가해준다.

<?php

namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
{
    protected function setUp(): void
    {
        parent::setUp();

        $this->withoutVite();
    }
}

withoutVite 메소드를 추가하면, vite 가 disable 되서 해당 에러는 발생하지 않게 된다.