Updated the JS dependencies to the latest

1) Migrate from webpack 4 to webpack 5. This had a lot of breaking changes,
   so updated multiple webpack plugins and changed the config accordingly.
2) Replaced iconfont-webpack-plugin with a more maintained webfonts-loader.
3) Replaced deprecated babel-eslint with @babel/eslint-parser.
4) Replaced optimize-css-assets-webpack-plugin with a more maintained css-minimizer-webpack-plugin.
5) Updated all other JS packages and made the required code changes.

Fixes #6207
This commit is contained in:
Aditya Toshniwal
2021-02-10 12:47:52 +05:30
committed by Akshay Joshi
parent 589663d7d9
commit 1317e4254b
48 changed files with 3205 additions and 4039 deletions

View File

@@ -47,23 +47,10 @@ _.extend(pgBrowser, {
/* Get cached preference */
get_preference: function(module, preference){
const self = this;
// If cache is not yet loaded then keep checking
if(_.size(self.preferences_cache) == 0) {
var check_preference = function() {
if(self.preferences_cache.length > 0) {
clearInterval(preferenceTimeout);
return _.findWhere(
self.preferences_cache, {'module': module, 'name': preference}
);
}
},
preferenceTimeout = setInterval(check_preference, 1000);
}
else {
return _.findWhere(
self.preferences_cache, {'module': module, 'name': preference}
);
}
return _.findWhere(
self.preferences_cache, {'module': module, 'name': preference}
);
},
/* Get all the preferences of a module */