My JavaScript code is as follows:
class UrlParameters {
constructor() {
this.initVariablesWithDefaultValues();
var serverUrlData = HelperJSViewBag.getValue("UrlData", true);
var urlVariables = serverUrlData ? serverUrlData : HLinks.getAllUrlVariables();
var sessionID = this.convertToString(urlVariables["sessionID"]);
var idSession = this.convertToString(urlVariables["idSession"]);
var sessionid = this.convertToString(urlVariables["sessionid"]);
if (idSession.length > 0)
this.sessionID = idSession;
else if (sessionid.length > 0)
this.sessionID = sessionid;
else
this.sessionID = sessionID;
// more code here...
}
static getInstance() {
if (typeof UrlParameters.urlParameters === "undefined")
UrlParameters.urlParameters = new UrlParameters();
return UrlParameters.urlParameters;
}
getData() {
return {
// data values here...
}
}
// other methods and functions...
convertToString(value, defaultValue) {
// conversion logic here
}
convertToInt(value, defaultValue) {
// conversion logic here
}
convertToBoolean(value, defaultValue) {
// conversion logic here
}
}
When I enable optimizations using
BundleTable.EnableOptimizations = true
, the ASP.NET does not minify the files properly. Instead, it returns a new file with errors such as:
// Error messages here...
I have searched extensively online for a solution to this issue but haven't found one yet. Could it be due to the usage of ES6 standard in my code?
The version of System.Web.Optimization that I am currently using is 1.1.0.0.