Open joojaewoo opened 10 months ago
Actual and for me :)
Next solution is temporary solving issue:
disableConsole();
const result = await VueI18NExtract.createI18NReport({
vueFiles: this.vueFiles,
languageFiles: this.languageFiles,
exclude: systemHints
});
enableConsole();
const originMethods: Record<string, typeof Function> = {};
const emptyFn = () => {};
[].concat
// @ts-ignore
.call(Object.keys(console), Object.keys(console.__proto__))
.filter(prop => typeof console[prop] === 'function')
.forEach(fn => {
originMethods[fn] = (console[fn] as typeof Function).bind(console);
});
export const disableConsole = () => {
Object.keys(originMethods).forEach(fn => {
// @ts-ignore
console[fn] = emptyFn;
});
};
export const enableConsole = () => {
Object.keys(originMethods).forEach(fn => {
// @ts-ignore
console[fn] = originMethods[fn];
});
};
Can you provide additional options to createI18NReport? I don't want to see the console for the missingKey list. Could you please add the corresponding console exposure option? like this