1

I'm on a React app created with Vite. I need to use the Heatmap libraries on Leaflet which I load like this on the index.html file:

<script src="/src/heatmap.min.js"></script>
<script src="/src/leaflet-heatmap.js"></script>

Locally it runs ok, I can see the heatmap and everything. The issue is on the Cloudflare deploy, I get this error:

Refused to execute script from 'https://logistic.innercore.ai/src/heatmap.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

You can even see it for yourself going to https://logistic.innercore.ai/zones and picking the 3rd option on the bottom bar. enter image description here

This issue really goes beyond my knowledge, I don't know what else to try. Is it possible to add those javascript modules some other way? Or what would be the solution. Thanks.

Daniel Tkach
  • 576
  • 2
  • 9
  • 18

0 Answers0