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

[Windows] Wrong Vite manifest when creating a Laravel project with Jetstream (css path with incorrect backslash) #1098

Closed
TiagoSilvaPereira opened this issue Jul 21, 2022 · 2 comments

Comments

@TiagoSilvaPereira
Copy link

TiagoSilvaPereira commented Jul 21, 2022

  • Jetstream Version: 2.10.1
  • Jetstream Stack: Livewire
  • Uses Teams: no
  • Laravel Version: 9.21.4
  • PHP Version: 8.1.0
  • Database Driver & Version: Mysql 8

Description:

When creating a new Laravel project with Jetstream on Windows machines, after running npm run build to compile the Vite assets, the public\build\manifest.json is being generated with wrong backslashes in the CSS path, as you can see in the following image, and causing the following exception:

Unable to locate file in Vite manifest

image

The issue was confirmed on Windows 11 and Windows 10 machines. It was also tested on a Linux machine with Ubuntu 20.04, but the problem doesn't happen.

It started happening this week, as projects created until last week were correctly generating the manifest.json file.

The issue doesn't happens when creating a new Laravel project without Jetstream

Steps To Reproduce:

1 - Create a new Laravel project with Jetstream/Livewire (maybe using laravel new project --jet) on a Windows machine
2 - Run npm run build to compile the Vite assets
3 - Open the file public\build\manifest.json to see the backslashes

Related Issues

TiagoSilvaPereira/vemto-issues#351
laravel/vite-plugin#19

@timacdonald
Copy link
Member

Duplicate of: laravel/vite-plugin#101 We can continue the conversation over there.

@LeviCanales
Copy link

LeviCanales commented Jul 22, 2022

composer create-project laravel/laravel myproject --no-cache
cd myproject
composer require laravel/jetstream -W --no-cache
php artisan jetstream:install livewire
npm install
npm run build
php artisan migrate
same bug with slash in app.css

Laravel v9.21.6
"laravel/jetstream": "^2.10"
"vite": "^3.0.0"

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

3 participants