I'm trying to run this library ParticleJS which requires me to download a Json.
I added this file into theme/libraries.yml
butthis way:
global-js:
js:
assets/js/particles.min.js : {}
assets/js/particles.json : {}
But that gives me this error:
Refused to execute script from 'https://www.example.com/themes/nexus/assets/js/particles.json?pem8cm' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
So I'm trying to add the file via twig usingadded:
<script src="themes/nexus/assets/js/particles.json"></script>
And it is giving me the @include but it's not working eithersame error.
Can someone help me with this problem, please? How should I include any other file into twig templates? Thank you