Answer the question
In order to leave comments, you need to log in
How to call a function from a webpack bundle?
There is a function that is written in the webpack bundle. I connect this bundle to the page and I need to call this function.
How to do it?
Answer the question
In order to leave comments, you need to log in
In general, so far I have only one option - this is through window. You define your function in window, for example , and it is available everywhere, it is not even necessary to access it through window.foo (), you can just foo (); window.foo = function() {}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question