I'm trying to incorporate javascript modules into a site that uses PJAX, e.g.:
<script type="module" src="index.js"></script>
I'm finding that when I navigate to these pages from another page in the site, the modules never load. They do load if I refresh the page. Is there a way to ensure that modules like this work with PJAX here?
If you use this file in one page only. call this file in the #pjax-container not outside the container. for more information check this.