Files
frontend-app-learning/webpack.prod.config.js
Michael Terry 192a58ab51 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
2021-09-24 10:09:17 -04:00

19 lines
539 B
JavaScript

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;