Skip to content

[9.x] Vite #5904

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

Merged
merged 6 commits into from
Jun 22, 2022
Merged

[9.x] Vite #5904

merged 6 commits into from
Jun 22, 2022

Conversation

jessarcher
Copy link
Member

@jessarcher jessarcher commented Jun 13, 2022

This PR makes Vite the default in Laravel.

Please see laravel/framework#42785 for more information.

Please note this PR gitignores the Vite compiled assets directory, so instead of committing your compiled assets, you would build them when you deploy.

@jessarcher jessarcher marked this pull request as ready for review June 17, 2022 06:59
@taylorotwell taylorotwell marked this pull request as draft June 18, 2022 05:44
@taylorotwell taylorotwell marked this pull request as ready for review June 22, 2022 18:07
@taylorotwell taylorotwell merged commit 86b4b1b into 9.x Jun 22, 2022
@taylorotwell taylorotwell deleted the vite branch June 22, 2022 18:07
@@ -1,4 +1,5 @@
/node_modules
/public/build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this added?? I tried to use npm run build locally so that my assets are production ready because I need to deploy to production, I was expecting that it should work on prod without the need to install npm packages...

does this mean that i should do an npm install then npm run build in prod?

I'm getting error

Vite manifest not found at: /releases/1670917824/public/build/manifest.json

Am I missing something here? maybe a link to a docs that helps me with deploying vite assets to prod?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind I found this https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#optional-git-ignore-the-build-directory

This is preference base and Laravel is just more inclined in building assets during deployment.

The /public/build can just be commented out.

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.

3 participants