Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generateBundle(options, bundle) {
const gzipSize = gzip.sync(
bundle['carbon-components-react.min.js'].code
);
const { bundleSizeThreshold } = packageJson;
console.log('Total size (gzipped):', gzipSize); // eslint-disable-line no-console
if (gzipSize > bundleSizeThreshold) {
throw new RangeError(
`Exceeded size threshold of ${bundleSizeThreshold} bytes (gzipped)!`
);
}
},
},
generateBundle(options, bundle) {
const gzipSize = gzip.sync(
bundle['carbon-components-react.min.js'].code
);
const { bundleSizeThreshold } = packageJson;
console.log('Total size (gzipped):', gzipSize); // eslint-disable-line no-console
if (gzipSize > bundleSizeThreshold) {
throw new RangeError(
`Exceeded size threshold of ${bundleSizeThreshold} bytes (gzipped)!`
);
}
},
},