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:
File diff suppressed because one or more lines are too long
18
webpack.prod.config.js
Normal file
18
webpack.prod.config.js
Normal 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;
|
||||
Reference in New Issue
Block a user