will webpack change the variables in the packaged js file? Is this caused by a problem with the version of webpack? Ask for the guidance of the great gods.
part of the code before packaging is as follows: * *
var page = {
data : {
date : "2018/1/1 00:00:00",
},
loadTime : function(){
var _this = this; //_this
var current = Date();
var seconds = (Date.parse(current)-Date.parse(_this.data.date))/1000;//_this.data.date
timeObject.days = Math.floor(seconds/(3600*24));
}
}
the loadtime function in the packaged page looks like this (_ this is missing):
loadTime: function () {
e = Date(),
n = (Date.parse(e) - Date.parse(this.data.date)) / 1000;
t.days = Math.floor(n / 86400),
}
browser error