JavaScript linking

16 views
Skip to first unread message

Daniel Chiemelu

unread,
Mar 13, 2020, 8:09:15 AM3/13/20
to django...@googlegroups.com
Please how can I link JavaScript to my project when I stored my JavaScript in my static folder/JS subdirectory

Shishir Jha

unread,
Mar 13, 2020, 8:21:09 AM3/13/20
to django...@googlegroups.com
One way to do that would be to use bundler like webpack. Do whatever you want to do on frontend and then convert it into static assets using bundler and then place it as an app in django.
I assume you were talking about linking js with django as this is the group for django.

Two such bundlers you can check are webpack(more configuration)
And parcel(simple and less configuration)

But everytime if you make some changes on frontend side you will have to run build command to convert files to static assets.


On Fri, 13 Mar 2020, 5:38 pm Daniel Chiemelu, <chiemeluchu...@gmail.com> wrote:
Please how can I link JavaScript to my project when I stored my JavaScript in my static folder/JS subdirectory

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABukqF5vJdxtSXwwhob3%3DjbjLVPNyWmhBteNAKkMKj427curdw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages