#Cant get a JS file to load
1 messages · Page 1 of 1 (latest)
Your assets need to be in the public directory, since thats the only directory which is public to the browser.
Generally you have the source files in resources and use a bundler like webpack or vite to build the assets into public, which you can then load into your view.
If you don't use a bundler just put your assets manually in public
That works! Thanks for the help
@cinder compass I'll keep the bundling in mind. By the way, do you know how much of a pain would it be to convert from Gulp to Vite?
Vite is overpowered
Gulp sucks
This is a new project, right?
Just start using Vite
docs vite
No, I'm porting legacy code from laravel 5.2 to 9
Yeah ok but its a new L9 install
So Vite is already configured for you
Or did you completely upgrade 5.2 to 9?
Yes, completely fresh L9. Just trying to manually port the legacy code
Yeah gotcha
Just leave your gulp stuff in the old project and start using Vite here
The docs I just linked will help you out
Perfect, thank you so much!