Skip to content

Commit

Permalink
Fix build to be re-runnable without module changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lramos15 committed Sep 23, 2021
1 parent 0f201c2 commit 4a8b3a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 4a8b3a6

Please sign in to comment.