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

Add vite instructions to README.md #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidschrooten
Copy link

@davidschrooten davidschrooten commented Nov 19, 2022

Include instructions how to setup vite with inertia, for backend and frontend part.

#3

@davidschrooten davidschrooten changed the title Update README.md Add vite installation instructions to README.md Nov 22, 2022
@davidschrooten davidschrooten changed the title Add vite installation instructions to README.md Add vite instructions to README.md Nov 22, 2022
@BrandonShar
Copy link
Collaborator

Thanks @davidschrooten , this is great! I'd like to add some sort of React/Vue documentation as well if we're adding Svelte.. maybe something like a small sample folder of markdown examples would help?

Only thing I'm unsure of is if we want to document whitenoise here, in my mind that's a deployment issue, not something associated with Inertia. What do you think?

I'm a little slow to cut releases right now because it's American Thanksgiving week so I appreciate your patience!


Install the following python packages via pip
```bash
pip install django-vite whitenoise

Choose a reason for hiding this comment

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

We don't need whitenoise, but your example uses the Django adapter for InertiaJS.
Maybe we can swap those?

Suggested change
pip install django-vite whitenoise
pip install django-vite inertia-django

MIDDLEWARE = [
# ...
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",

Choose a reason for hiding this comment

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

Perhaps better to keep the whitenoise config as an example rather than within the vite and inertia setup?

Comment on lines +95 to +96
# If use HMR or not. We follow Django's DEBUG mode
DJANGO_VITE_DEV_MODE = DEBUG

Choose a reason for hiding this comment

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

Duplicate setting

Suggested change
# If use HMR or not. We follow Django's DEBUG mode
DJANGO_VITE_DEV_MODE = DEBUG

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