Answer the question
In order to leave comments, you need to log in
What is the correct way to use jQuery with gulp-conact?
Good day. I use gulp-concat, but Jquery is enabled in the project, as a result of which I have to insert $(document).ready(function() {}) into each js file. Is there any way to avoid this? Or is there nothing wrong with that?
Answer the question
In order to leave comments, you need to log in
Well, in general, in modern conditions, it is better to implement modularity with some more suitable tool for this - for example, Webpack.
Basically, there is nothing wrong with your approach. Your functionality is packaged into separate files in closures, so the global scope remains clean.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question