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 better vite integration for dev and production #179

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

Conversation

twinkarma
Copy link
Contributor

Resolves #105

  • Add setting variables for configuring vite paths from django
  • Add template tags for adding vite hmr code and assets
  • Update readme with build instructions and more information about the integration
  • Ignore generated js files

asset_static_path_found = finders.find(asset_static_path)
if asset_static_path_found:
return mark_safe(f"<script type = 'module' src = '{static(asset_static_path)}' > </script>")
else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Raise exception?

@@ -8,7 +9,9 @@
{{ csrf | json_script:"csrf" }}
{{ value | json_script:"responseValue" }}
{{ survey.survey_config | json_script:"configData" }}
<script type="module" src="{% static 'js/sort-ui/sort_survey_response.js' %}"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

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

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.

2 participants