Major Despard
Major Despard

Reputation: 95

How to use Django with Svelte?

I know it is possible to just copy index.html generated by Svelte and use it as a template, but I have a few questions:

  1. Is there a plugin that eases up the process?

  2. Where do I put the CSS and bundle.js files?

  3. Is it even advisable to use these two together?

Upvotes: 3

Views: 6433

Answers (2)

Thismatters
Thismatters

Reputation: 616

I've put together a package for integrating Svelte and Django: django-svelte

You still have to be responsible for building the bundle and ensuring that django knows where the bundle can be found. django-svelte provides a templatetag for referencing the bundle and a template for the Svelte environment.

Upvotes: 3

joshnuss
joshnuss

Reputation: 2047

You can find an example here: https://github.com/cdrappi/django-svelte

Upvotes: 3

Related Questions