mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:53:38 +08:00
FEATURE: Deprecate lodash so we can remove it.
It's currently 240k of Javascript we don't need anymore. It's been replaced by ES6 and a couple helper functions.
This commit is contained in:
parent
3a46e44ed8
commit
8c0f18794e
|
@ -125,5 +125,23 @@ export default {
|
|||
|
||||
window.onerror(e && e.message, null, null, null, e);
|
||||
});
|
||||
|
||||
// Deprecate lodash usage
|
||||
let lo = window._;
|
||||
if (lo) {
|
||||
Object.keys(lo).forEach(m => {
|
||||
let old = lo[m];
|
||||
lo[m] = function() {
|
||||
deprecated(
|
||||
`lodash is deprecated and will be removed from Discourse.`,
|
||||
{
|
||||
since: "2.6",
|
||||
dropFrom: "2.7"
|
||||
}
|
||||
);
|
||||
return old(...arguments);
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user