LayTec-AG / Plotly.Blazor

This library packages the well-known charting library plotly.js into a razor component that can be used in a Blazor project.
MIT License
346 stars 50 forks source link

Version 5.1.1 reports plotly-latest.min.js MIME type as text/html instead of text/javascript #440

Closed mmauri closed 1 week ago

mmauri commented 3 weeks ago

Hi, Thank you for your work on the plotly wrapper, This is what v.4.3.0 shows (correct): image

But 5.1.1 reports MIME type as text/html: image

The tricky point is that if the content-security-policy is enabled, Chromium refuses to load the plotly.js: image

Thanks M

mmauri commented 1 week ago

It was much simpler, the new version does not copy the plotly.js as stated in the docs-> plotly-latest.min.js Instead just copies with the version name, so the script link has to be updated image

sean-mcl commented 1 week ago

Usually you don't have to import these files anymore in the Index.html, Plotly.Blazor loads it on its own dynamically.