I'm finding that when I " /> I'm finding that when I " /> I'm finding that when I "/>

PJAX doesn't load script modules

105 Views Asked by At

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?

1

There are 1 best solutions below

0
loka shafeek On

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.