From 3bbd791e0d0a103585f18bd7429a3e0b239ade6b Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 20 Aug 2026 11:54:16 -0700 Subject: [PATCH] fix(ci): update webpack config so size-limit is not zeroed out The webpack config was tree-shaking both entries here to zero bytes, so the size-limit CI check was just reporting 'added', without doing anything useful. Updated the webpack config so that it detects what actually gets loaded. --- .size-limit.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.size-limit.js b/.size-limit.js index 98bf5803fcbe..d4fcdc87bf75 100644 --- a/.size-limit.js +++ b/.size-limit.js @@ -414,8 +414,16 @@ module.exports = [ path: ['packages/server-utils/build/esm/orchestrion/runtime/hook.js', 'packages/node/build/import-hook.mjs'], ignore: [...builtinModules, ...nodePrefixedBuiltinModules], gzip: true, - limit: '5 KB', + limit: '87 KB', disablePlugins: ['@size-limit/esbuild'], + modifyWebpackConfig: function (config) { + // Both packages declare `sideEffects: false`, which lets webpack + // drop the side-effecting `--import` entry and report 0 bytes. + // Keep side effects so this measures what Node really loads. + config.optimization = { ...config.optimization, sideEffects: false }; + + return config; + }, }, { name: '@sentry/node - without tracing',