From 4a8b3a62439296be1681b0f138c17cacb42005fe Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Thu, 23 Sep 2021 10:55:57 -0400 Subject: [PATCH] Fix build to be re-runnable without module changes --- .esbuild.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.esbuild.config.js b/.esbuild.config.js index e908ef4..2c7951a 100644 --- a/.esbuild.config.js +++ b/.esbuild.config.js @@ -5,7 +5,7 @@ const path = require('path'); // Removes the warning from the app insights module since we don't want it to spam the console function patchAppInsightsModules() { const nodeAppInsightsModule = fs.readFileSync(path.join(__dirname, 'node_modules/applicationinsights/out/Library/Config.js'), 'utf8'); - const fileWithRemovedWarning = nodeAppInsightsModule.replace(/Logging.warn\([^)]*invalid instrumentation key[^)]*\)/, '/* $& */'); + const fileWithRemovedWarning = nodeAppInsightsModule.replace(/Logging.warn\([^)]*invalid instrumentation key[^)]*\)/, '// Warning removed'); fs.writeFileSync(path.join(__dirname, 'node_modules/applicationinsights/out/Library/Config.js'), fileWithRemovedWarning, 'utf8'); }