Answer the question
In order to leave comments, you need to log in
How to properly organize file connection in JS?
I'm building js scripts with webpack. For each page, I organize my own base file, in which I include ready-made pieces of code, and this file is already assembled into the final script to be sent to the client. The problem is that different packages may require the inclusion of the same pieces of code. How to organize the connection correctly?
1) Through import or require?
2) Should all the required dependencies be included in the base file or in each file that has dependencies, should each of them be included?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question