Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/bs / src / .plugins / prod / performance.ts
Size: Mime:
import { Configuration, Options } from '../../typings'

const PROD_PERF_CONFIG = {
  hints: 'warning',
}

export default function performanceMiddleware(
  config: Configuration,
  options: Options
) {
  const { isClient } = options
  // Performance budget feature.
  // This enables checking of the output bundle size, which will result in
  // warnings/errors if the bundle sizes are too large.
  // We only want this enabled for our production client.  Please
  // see the webpack docs on how you can configure this to your own needs:
  // https://webpack.js.org/configuration/performance/
  // Enable webpack's performance hints for production client builds.
  // Else we have to set a value of "false" if we don't want the feature.
  const performance = isClient ? PROD_PERF_CONFIG : false
  config.performance = performance
}