node.js - Vue+Webpack在dev环境下没有问题build后出现莫名错误
迷茫
迷茫 2017-04-17 15:08:07
0
1
640

build后出现如下错误,不知道哪里的问题

点开后出现

另外chrome下source中的多余webpack目录是干嘛的?

source下webpack目录

对于webpack和Node这块真的迷糊 这玩意老是报错,不懂dev下没错 为什么build后还会出错?如果dev和Build之后不同,那么dev下调试的意义何在。。只是被这个问题气到了 小小吐槽。。。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
阿神

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template