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

Broken fresh laravel project on v9.37.0 #44738

Closed
lmeraki opened this issue Oct 26, 2022 · 6 comments
Closed

Broken fresh laravel project on v9.37.0 #44738

lmeraki opened this issue Oct 26, 2022 · 6 comments

Comments

@lmeraki
Copy link

lmeraki commented Oct 26, 2022

  • Laravel Version: 9.37.0
  • PHP Version: 8.1.11
  • Database Driver & Version: MariaDB 10.6.10

Description:

a blank page on fresh laravel project after running npm run dev, while npm run build works fine. I think after this PR #44096.

Additional:

  • nodejs: 16.18.0
  • npm: 8.19.2
  • vite: 3.1.8

Steps To Reproduce:

  1. composer create-project laravel/laravel example-app
  2. composer require laravel/breeze --dev
  3. php artisan breeze:install vue
  4. npm run dev
@iquad
Copy link

iquad commented Oct 26, 2022

+1 for broken fresh page.

I assume that change brokes.

#44096 should add needed link headers, but seems like Vite::preloadedAssets() returns empty.

Changing @vite("resources/js/Pages/{$page['component']}.vue") to @vite('resources/js/app.js') works.

@joshuadabejero
Copy link

+1 for broken fresh page.
Displays Blank Screen.

image

Hopefully will get the fix soon!

Thanks @lmeraki for the report, now I have a peace of mind that it's not only me having this issue.

@joshuadabejero
Copy link

+1 for broken fresh page.

I assume that change brokes.

#44096 should add needed link headers, but seems like Vite::preloadedAssets() returns empty.

Changing @vite("resources/js/Pages/{$page['component']}.vue") to @vite('resources/js/app.js') works.

This fix the broken fresh page / blank page out of the box experience.

@driesvints
Copy link
Member

Hey all. We released a fix for Breeze. Thanks!

@iquad
Copy link

iquad commented Oct 26, 2022

Can confirm fix works.

For existing projects, no need to call breeze:install again.
Just change @vite("resources/js/Pages/{$page['component']}.vue") to @vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"]) on resources/views/app.blade.php

@timacdonald
Copy link
Member

This one has been fixed in the latest release (just tagged). Sorry about that folks.

Using:

@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])

will retain the new preloading functionality and continue to work in dev mode.

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

No branches or pull requests

5 participants