fix: hardcode the newrelic agent, to load it earlier (#652)

This is a test, before making a more proper fix in frontend-build.
But I'd like to confirm this fixes some issues we've seen with
newrelic metrics.

AA-1015
This commit is contained in:
Michael Terry
2021-09-24 10:09:17 -04:00
committed by GitHub
parent 7215db6682
commit 192a58ab51
2 changed files with 28 additions and 0 deletions

File diff suppressed because one or more lines are too long

18
webpack.prod.config.js Normal file
View File

@@ -0,0 +1,18 @@
const { getBaseConfig } = require('@edx/frontend-build');
const config = getBaseConfig('webpack-prod');
// Filter plugins in the preset config that we don't want
function filterPlugins(plugins) {
const pluginsToRemove = [
'a', // "a" is the constructor name of HtmlWebpackNewRelicPlugin
];
return plugins.filter(plugin => {
const pluginName = plugin.constructor && plugin.constructor.name;
return !pluginsToRemove.includes(pluginName);
});
}
config.plugins = filterPlugins(config.plugins);
module.exports = config;