Javascript libraries configured in Settings / Languages ββand Structures / javaScript / Libraries (and shown as external libraries in the project window) have absolutely nothing to do with links in the <script> . The former are used by the IDE to highlight code / navigation / error counting, the latter are used by the browser at runtime. The browser knows nothing about javascript libraries configured in the IDE; the IDE does not use <script> links in your HTML files.
Let me try to clarify the situation:
Which libraries you intend to use: By default, shutdown works for all JavaScript files located under your project root. So, if you already have library .js files in your project structure, this is enough to get the completion. If they are missing and you donβt want to knock on the project with all these files, you can store them from the outside (outside your project) and configure them as libraries to make them available for WebStorm. Also note that libraries are "lightweight" compared to .js files in your project - they are considered as read-only, and checks are disabled. In addition, you can assign documentation URLs to them by providing external documentation for the library code. Thus, even if you have your library files in your project, it makes sense to add them as libraries
So, we summarize:
library files located next to your source files in the project structure are available for both WebStorm and browser, regardless of whether they are added to javascript libraries in the settings
The online library referenced by the CDN link in your HTML is available to the browser at run time, but cannot be used to complete in the IDE
library files hosted outside the project and configured as javascript libraries will be available for WebStorm to complete,
but will not be loaded by the browser
lena
source share