M
M
madc0de2020-06-29 20:18:57
webpack
madc0de, 2020-06-29 20:18:57

How to include another file inside one js file in webpack?

5efa21a668b82786107029.png
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

1 answer(s)
D
Dima Pautov, 2020-06-29
@bootd

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 question

Ask a Question

731 491 924 answers to any question