Answer the question
In order to leave comments, you need to log in
How to include another file inside one js file in webpack?
When including import about from 'fn.js', an error occurs. I wanted to work as with other scripts installed via npm. Prescribe all the necessary functions globally in the file and use them in other files. For example, I want to write once the resize function with debounce and use it in all files according to the structure type (for example, the header.js file)
Has anyone encountered a similar error or am I doing something wrong?
Answer the question
In order to leave comments, you need to log in
well, then you point the correct path to the file, it’s clearly written to you that there is no such file in the specified directory
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question