chore: suppress boring warnings emitted from babel

This commit is contained in:
LeoYuan 袁力皓 2022-06-16 23:42:22 +08:00 committed by 林熠
parent 8dab2ce68a
commit e005ca2e2e

View File

@ -19,4 +19,10 @@ Object.defineProperty(window, 'React', {
window.scrollTo = () => {};
window.console.warn = () => {};
const originalLog = window.console.log;
window.console.log = (...args) => {
// suppress boring warnings
if (args[0].includes('@babel/plugin-proposal-private-property-in-object')) return;
originalLog.apply(window.console, args);
};
window.React = window.React || {};