index.tsx 747 B

12345678910111213141516171819202122
  1. import {BundleContextProvider} from 'sentry/views/bundleAnalyzer/bundleContextProvider';
  2. import ModulesTreemap from 'sentry/views/bundleAnalyzer/components/ModulesTreemap';
  3. import {getViewerData} from 'sentry/views/bundleAnalyzer/utils/analyzer';
  4. import {store} from './store';
  5. export const bundleStats = require('../../../../src/sentry/static/sentry/dist/stats.json');
  6. // export const bundleStats = require('sentry/views/releases/stats.json');
  7. const chartData = getViewerData(bundleStats);
  8. store.defaultSize = `parsedSize`;
  9. store.setModules(chartData);
  10. store.setEntrypoints([null]);
  11. function BundleAnalyzer() {
  12. return (
  13. <BundleContextProvider>
  14. <ModulesTreemap />
  15. </BundleContextProvider>
  16. );
  17. }
  18. export default BundleAnalyzer;