We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a34d315 commit 1efa150Copy full SHA for 1efa150
desktop/src/main.ts
@@ -10,6 +10,7 @@ const detectPort = window.require('detect-port');
10
11
if (environment.production) enableProdMode();
12
13
+suppressWarnings();
14
start();
15
16
@@ -37,3 +38,19 @@ function showAlreadyOpenError() {
37
38
progress.setLocale(Settings.getLocale());
39
progress.setError('alreadyOpenError');
40
}
41
+
42
43
+function suppressWarnings() {
44
45
+ const warningTexts: string[] = [
46
+ 'The vm module of Node.js is deprecated in the renderer process and will be removed.'
47
+ ];
48
49
+ const warnFunction = console.warn;
50
51
+ console.warn = function() {
52
+ if (!warningTexts.find(text => arguments[0].includes(text))) {
53
+ return warnFunction.apply(console, arguments);
54
+ }
55
+ };
56
+}
0 commit comments