Rollup plugin analyzer what bundle size limit does limitBytes value translate to?

Viewed 17

I've added rollup plugin analyzer to a ReactJS project.

Under the "CI usage example" section from the above link, there is a variable const limitBytes = 1e6

const limitBytes = 1e6

const onAnalysis = ({ bundleSize }) => {
  if (bundleSize < limitBytes) return
  console.log(`Bundle size exceeds ${limitBytes} bytes: ${bundleSize} bytes`)
  return process.exit(1)
}

rollup({
  entry: 'main.js',
  plugins: [analyze({ onAnalysis, skipFormatted: true })]
}).then(...)

I took a look through documentation, and may have missed something, though am not finding limitBytes.

Does anyone know what 1e6 would translate to in terms of bundle size limit, or how I would go about finding out?

Thank you

0 Answers
Related