There is no problem with dev. It’s just that webpack can compile successfully according to your configuration, but it does not guarantee that there is no problem with the syntax in your js file.
And according to your problem description, there is an error when the js file is executed. As for what the error is, I’ll take a bold guess
cannot read property 'call' of undefined
I guess there may be such a section in your code, myFunction.call(...). Your myFunction here is undefined, that is, it is not defined. It may be a spelling mistake or the execution context may be wrong.
There is no problem with dev. It’s just that webpack can compile successfully according to your configuration, but it does not guarantee that there is no problem with the syntax in your js file.
And according to your problem description, there is an error when the js file is executed. As for what the error is, I’ll take a bold guess
cannot read property 'call' of undefined
I guess there may be such a section in your code,
myFunction.call(...)
. YourmyFunction
here is undefined, that is, it is not defined. It may be a spelling mistake or the execution context may be wrong.