熱更新出錯(cuò)
加hot之前,保存代碼報(bào)錯(cuò)Cannot read property 'indexOf' of undefined,不知什么原因
出現(xiàn)在這個(gè)位置:
if (module.hot) {
var lastHash;
var upToDate = function upToDate() {
return lastHash.indexOf(__webpack_hash__) >= 0;
};
加hot之前,保存代碼報(bào)錯(cuò)Cannot read property 'indexOf' of undefined,不知什么原因
出現(xiàn)在這個(gè)位置:
if (module.hot) {
var lastHash;
var upToDate = function upToDate() {
return lastHash.indexOf(__webpack_hash__) >= 0;
};
2018-04-08
舉報(bào)
2018-04-10
lastHash 沒賦值,它不知道lastHash是string類型