build后出现如下错误,不知道哪里的问题
点开后出现
另外chrome下source中的多余webpack目录是干嘛的?
source下webpack目录
对于webpack和Node这块真的迷糊 这玩意老是报错,不懂dev下没错 为什么build后还会出错?如果dev和Build之后不同,那么dev下调试的意义何在。。只是被这个问题气到了 小小吐槽。。。
阿神2017-04-17 15:10:07
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.