Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Clears resolved instance of Vite when using withoutVite #47091

Merged

Conversation

nunomaduro
Copy link
Member

This pull request addresses an issue that may happen when the Vite facade gets used before calling $this->withoutVite() in your test suite. As example, if the user have the code

// AppServiceProvider@boot method...
Vite::useScriptTagAttributes([
    'crossorigin' => 'anonymous',
]);

// TestCase...
$this->withoutVite();

Vite::asset('foo.png'); // this fails with `Vite manifest not found` as Facade is still working with previous instance of Vite, and not the fake one.

@nunomaduro nunomaduro requested a review from taylorotwell May 15, 2023 13:14
@nunomaduro nunomaduro changed the title [10.x] Clears resolve instances of Vite when using withoutVite [10.x] Clears resolve instance of Vite when using withoutVite May 15, 2023
@nunomaduro nunomaduro changed the title [10.x] Clears resolve instance of Vite when using withoutVite [10.x] Clears resolved instance of Vite when using withoutVite May 15, 2023
@taylorotwell taylorotwell merged commit 89e549d into 10.x May 15, 2023
@taylorotwell taylorotwell deleted the fix/without-vite-still-reporting-manifest-not-found branch May 15, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants