JavaScript Libraries - CDN?
I have PhpStorm for 10 years and I still fight with this aspect over and over again. How do I tell the project that I am using the jQuery library if I am using a CDN and don't want to download it to the project?
Please sign in to leave a comment.
In Settings | Languages & Frameworks | JavaScript | Libraries, press Download..., choose `jquery` from the list.
Library won't be downloaded into your project folder, it will be stored in IDE configuration folder, `javascript\extLibs\global-types`
Well, for one thing, that does not allow me to specify the version of the library. I did end up using that, but at the time I submitted this post, I could not make that work (could not find NPM or Node). I ended up having to make it use Yarn (I'm on Windows, FYI). Plus this threw me off:
https://www.jetbrains.com/help/phpstorm/configuring-javascript-libraries.html
> Plus this threw me off:
and what's wrong with it? Doesn't it work?
No, and based on your comments, I assume that it was old documentation. If not, then it just does not work (I don't get any intentions for these links).
Documentation is up-to-date, and the intention works fine for me:
what do your CDN links look like?
Should work, unless you already have `javascript\extLibs\http_code.jquery.com_jquery-3.4.0.js` in your config dir.
But typings work better anyway, as they provide explicit types info that is missing in .js
Is There is no locally stored library for the HTTP link inspection enabled Settings | Editor | Inspections | JavaScript | General?
Ah, yea, that was the reason, thanks.