I installed, say jQuery:
npm install jquery
My site now has
ROOT/node_modules/jquery/*
subdirectory.
What to do next? Just write
<script src="/node_modules/jquery/src/jquery.js"></script>
Or can I do something to take jquery.jsfrom this path and / or encode the link in some portable way?
jquery.js
For example, suppose I use the Jade template. Shoud I write simply
script(src="/node_modules/jquery/src/jquery.js")
To answer your question in the near future: yes, you can copy jquery.jsand transfer it to any desired folder. Then you have to change the src attribute in the script element, for example:
<script src="/new/path/jquery.js"></script>
, , js , , :
<script src="/path/libs.js"></script>
libs.js .
libs.js
: , ,
NPM, .
, .
- , , . , - , , , . , , , webpack, gulp , . Webpack , :
. , .
, , ,
Dear, what kind of dependencies that you accept inside the node project should be in Node_Modules, and you must specify the dependency path of Node_Module / dependency_path, it will be better in project development and in Production.May it will be useful for you
Source: https://habr.com/ru/post/1679229/More articles:Query performance: single column and multiple columns - sqlHow can I implement Stateful Builder with CustomOperations and some with f #Determine how many times a webpage has been accessed - javascript% ~ in REM expression - windowsADC instruction in asm - assemblyWhat is the cleanest thread binding method working in Ruby? - ruby ββ| fooobar.comhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1679231/how-can-i-count-the-number-of-the-visitors-on-my-website-using-javascript&usg=ALkJrhhxw0YQx4e9mHDlZ-NATZ70lv1BCAinitialScrollIndex not working for FlatList - react-nativeHow to limit VHDL-2008 integer_vector? - vhdlChanging the color color of an image of a UIImageView template on a UITableViewCell click - iosAll Articles