diff --git a/.size-limit.js b/.size-limit.js index df7597618d70..1747b93aea21 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -1,3 +1,6 @@ +const builtinModules = require('module').builtinModules; +const nodePrefixedBuiltinModules = builtinModules.map(m => `node:${m}`); + module.exports = [ // Browser SDK (ESM) { @@ -190,37 +193,7 @@ module.exports = [ name: '@sentry/node', path: 'packages/node/build/esm/index.js', import: createImport('init'), - ignore: [ - 'node:http', - 'node:https', - 'node:diagnostics_channel', - 'node:perf_hooks', - 'node:worker_threads', - 'node:inspector', - 'node:path', - 'node:fs', - 'node:stream', - 'node:os', - 'node:net', - 'node:zlib', - 'node:child_process', - 'node:tls', - 'node:async_hooks', - 'node:util', - 'async_hooks', - 'child_process', - 'fs', - 'os', - 'path', - 'inspector', - 'worker_threads', - 'http', - 'stream', - 'zlib', - 'net', - 'tls', - 'module', - ], + ignore: [...builtinModules, ...nodePrefixedBuiltinModules], gzip: true, limit: '180 KB', }, @@ -229,38 +202,7 @@ module.exports = [ name: '@sentry/aws-serverless', path: 'packages/aws-serverless/build/npm/esm/index.js', import: createImport('init'), - ignore: [ - 'node:http', - 'node:https', - 'node:diagnostics_channel', - 'node:perf_hooks', - 'node:worker_threads', - 'node:inspector', - 'node:path', - 'node:fs', - 'node:stream', - 'node:os', - 'node:net', - 'node:zlib', - 'node:child_process', - 'node:tls', - 'node:async_hooks', - 'node:util', - 'async_hooks', - 'child_process', - 'perf_hooks', - 'fs', - 'os', - 'path', - 'inspector', - 'worker_threads', - 'http', - 'stream', - 'zlib', - 'net', - 'tls', - 'module', - ], + ignore: [...builtinModules, ...nodePrefixedBuiltinModules], gzip: true, limit: '140 KB', },