未捕获的ReferenceError:__webpack_require__未定义

时间:2018-12-21 20:19:11

标签: webpack

我收到以下错误。几个月来,我的应用程序一切正常,但是运行npm install之后才开始发生这种情况。

Uncaught ReferenceError: __webpack_require__ is not defined
    at eval (client.js:1)
    at eval (<anonymous>)
    at <anonymous>:33:11
    at Object../web/client.js (bundle.js:9667)
    at __webpack_require__ (bundle.js:768)
    at fn (bundle.js:131)
    at Object.0 (bundle.js:9678)
    at __webpack_require__ (bundle.js:768)
    at bundle.js:904
    at bundle.js:907

1 个答案:

答案 0 :(得分:0)

可能由于mode: "development"中的webpack.config.js而发生。一个可能的解决方案是也添加devtool: "inline-source-map",否则,设置mode: "production"