How to add External Js

Hi, I’m new working with Framework7 -CLI, and I want to add other .js files like GreenSock gsap.js, or chart.js to the app I.m working in.

I tried to add the script in the index.f7.html, I tried to import in the app.js, Also tried to add the script in the home.f7.html, but nothing work.

What is the correct way to add does types os external js files to framework7 -CLI?

Index should work as I’m using external scripts in my project. I have included before the closing body tag.

Njvan thanks, but when I try to put that way The browser shows the following errors:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (gsap.js, line 0)

[Error] Refused to execute http://localhost:8080/js/gsap.js as script because “X-Content-Type: nosniff” was given and its Content-Type is not a script MIME type.

Any one? I’m trying to add an external js library (specifically pouchdb-7.2.1.min.js) to my F7-React app but I get the error stated by @gdu in the console. If I try to load directly from browser, then I get the following response:

Cannot GET /js/pouchdb-7.2.1.min.js

So, what is the rigth place to put .js files? And what is the url to access them? Maybe some ajustment to nmp scripts is required? Or is this a VS code issue?

hi, did you manage to add an external js? in version 4 i had it working and upgrade to version 5 i don’t manage to add js Signature