Skip to content

Commit

Permalink
webpack budnle analyze static file added - conflict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetkuslular committed Aug 2, 2022
1 parent 6b76a7b commit 225b4c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { HTTP_STATUS_CODES } from './universal/utils/constants';

import voltranConfig from '../voltran.config';

const { bundleAnalyzerStaticEnabled } = require('__APP_CONFIG__');

const enablePrometheus = voltranConfig.monitoring.prometheus;
let Prometheus;

Expand Down Expand Up @@ -165,6 +167,11 @@ export const prepareMiddlewares = () => {
hiddie.use(helmet());
hiddie.use(cors);
hiddie.use('/', serveStatic(`${voltranConfig.distFolder}/public`));
bundleAnalyzerStaticEnabled &&
hiddie.use(
'/bundleAnalyze',
serveStatic(`${voltranConfig.distFolder}/public/project/assets/report.html`)
);
hiddie.use(cookieParser());
hiddie.use(utils);
hiddie.use(handleUrls);
Expand Down

0 comments on commit 225b4c9

Please sign in to comment.