-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
[docs] Expanded the Laravel quickstart with instructions on how to run Vite #4236
[docs] Expanded the Laravel quickstart with instructions on how to run Vite #4236
Conversation
Tests problem is just adding the missing things (vite/viteserve I think) to the https://github.com/drud/ddev/blob/master/.spellcheckwordlist.txt |
ddev get torenware/ddev-viteserve | ||
``` | ||
In `.ddev/.env` change `VITE_PROJECT_DIR=frontend` to `VITE_PROJECT_DIR=.` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it is marked as experimental, I think the following is important to add:
In `.ddev/.env` add `VITE_JS_PACKAGE_MGR=npm`. This tells `ddev-viteserve` to use `npm` to manage packages, and
helps keep dependencies in sync.
Laravel prefers npm
which uses the package.lock
. See torenware/ddev-viteserve#3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tyler36 - can you try using the "Suggestion" feature when you know what is the best thing to do? You can just click the icon shown, it makes it so easy for the author of a PR then to just accept and commit your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it is marked as experimental, I think the following is important to add:
I should probably change the docs; I no longer consider this to be experimental.
In `.ddev/.env` add `VITE_JS_PACKAGE_MGR=npm`. This tells `ddev-viteserve` to use `npm` to manage packages, and helps keep dependencies in sync.
Does Laravel itself rely on npm and package.lock? In general, I'd argue pnpm is a better package manager, especially in terms of its speed.
Laravel prefers
npm
which uses thepackage.lock
. See torenware/ddev-viteserve#3
Does it?
Co-authored-by: tyler36 <tyler36@users.noreply.github.com>
@Ellarddekoeijer thanks for adding the guide BTW. I know it will help alot of Laravel uses. There's been a lot of question lately on Discord too! |
…into add-vite-to-laravel-quickstart
@tyler36 thanks for the kind words earlier, I did not see them as I was making changes! |
In the future I will see if implementation guides for Vue, Reac, Intertia.js etc are needed or if we can simply link to existing vite implementation guides. Currently I think that the implementation process is identical and no additional steps are required. |
Everybody happy with this? |
@Ellarddekoeijer there are other places to put more extensive guides too, not just the quickstart, so when it looks like we need to do more just let me know. Thanks for your expertise here! |
@mattstein have anything to say about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do, with apologies in advance to @Ellarddekoeijer for how nitpicky they are! (I’m working on a bunch of edits like this over here 😅 .) Used suggestions for the first time so I hope they’re easy to merge or discuss.
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Co-authored-by: Matt Stein <m@ttste.in>
Thanks all! |
These changes can be found under the Laravel section in the quickstart for CMSes page.