Add into statoscope.config.js
module.exports = {
validate: {
plugins: ['@statoscope/webpack'],
rules: {
'@statoscope/webpack/build-time-limits': ['error', 10000],
'@statoscope/webpack/restricted-modules': ['error', [/\/some-package\/dist\/some-module\.js/]],
'@statoscope/webpack/restricted-packages': [
'error',
[
'lodash',
'browserify-crypto',
{
name: '@bar/foo',
version: '1.0.0 - 4.0.0',
description: 'Package is not maintained and has security issues',
alternatives: [
'@bar/foo2'
]
}
],
],
'@statoscope/webpack/no-packages-dups': ['error'],
'@statoscope/webpack/entry-download-time-limits': ['error', { global: { maxDownloadTime: 3000 } }],
'@statoscope/webpack/entry-download-size-limits': ['error', { global: { maxSize: 3 * 1024 * 1024 } }],
'@statoscope/webpack/no-modules-deopts': ['warn'],
'@statoscope/webpack/diff-build-time-limits': ['error', 3000],
'@statoscope/webpack/diff-entry-download-size-limits': [
'error',
{ global: { maxSizeDiff: 3 * 1024 } },
],
'@statoscope/webpack/diff-entry-download-time-limits': [
'error',
{ global: { maxDownloadTimeDiff: 500 } },
],
'@statoscope/webpack/diff-deprecated-modules': ['error', [/\/path\/to\/module\.js/]],
'@statoscope/webpack/diff-deprecated-packages': ['error', ['rxjs']],
}
}
}