qdouble / angular-webpack-starter

A complete Angular 6 and Webpack 4 starter seed with minimal and full featured branches. Full featured branch includes: Material Design 2 (Bootstrap 4 branch available as well), @ngrx, HMR, DLLs and optional use of Universal for server-side rendering - Supports AOT (offline) compilation, sync and lazy loading. Karma/Protractor for e2e/unit tests.
MIT License
883 stars 181 forks source link

Ability to skip bundle analysis for CI prod builds #329

Closed Aigeec closed 6 years ago

Aigeec commented 6 years ago

It would be great to be able to skip the bundle analysis in cases where you are doing use an automated build tool such as travis or jenkins.

Could you add a constant or env parameter to optionally disable it e.g.

if (!E2E && !WATCH && ANALYZE_BUNDLE) {
  config.plugins.push(
    new BundleAnalyzerPlugin({ analyzerPort: 5000 })
  );
}
qdouble commented 6 years ago

@Aigeec it's a constant already: https://github.com/qdouble/angular-webpack-starter/blob/master/constants.js#L11 https://github.com/qdouble/angular-webpack-starter/blob/master/webpack.config.ts#L219

Are you looking for it to be a npm flag?