The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/scripts/webpack/webpack.stats.js

35 lines
946 B

const { RsdoctorWebpackPlugin } = require('@rsdoctor/webpack-plugin');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { merge } = require('webpack-merge');
const prodConfig = require('./webpack.prod.js');
module.exports = (env = {}) => {
const config = { plugins: [new BundleAnalyzerPlugin()] };
// yarn build:stats --env doctor
if (env.doctor) {
config.plugins.push(
new RsdoctorWebpackPlugin({
supports: {
// disable rsdoctor bundle-analyser
generateTileGraph: false,
},
})
);
}
// disable hashing in output filenames to make them easier to identify
// yarn build:stats --env doctor --env namedChunks
if (env.namedChunks) {
config.optimization = {
chunkIds: 'named',
};
config.output = {
filename: '[name].js',
chunkFilename: '[name].js',
};
}
return merge(prodConfig(env), config);
};