Answer the question
In order to leave comments, you need to log in
Are npm modules duplicated?
I'm building a project with Gulp. I have a main.js file to which other files with scripts are connected: initialization of sliders, scripts for menus, etc. In these files I use plugins from npm, a probably stupid question arose: "If I connect the same npm module, for example JQuery, to different files, and then I connect these files to main.js - will the modules from npm be duplicated? "
Answer the question
In order to leave comments, you need to log in
Building a project with GulpGulp cannot collect anything, since Gulp is a task runner (task launcher if in Russian), it can collect what Gulp launches, for example, a bundler (collector) like Webpack or Rollup, or just a file concatenator.
If I include the same npm module, for example JQuery, in different files, and then I include these files in main.js - will the modules from npm be duplicated?depends on what you are collecting, if the usual concatenation of files - then yes, there will be duplication. And if Webpack or Rollup - no.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question