Skip to content

Commit 508cb10

Browse files
authored
fix(ci): update webpack config so size-limit is not zeroed out (#23467)
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. via: @timfish
1 parent 5added8 commit 508cb10

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎.size-limit.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,16 @@ module.exports = [
414414
path: ['packages/server-utils/build/esm/orchestrion/runtime/hook.js', 'packages/node/build/import-hook.mjs'],
415415
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
416416
gzip: true,
417-
limit: '5 KB',
417+
limit: '87 KB',
418418
disablePlugins: ['@size-limit/esbuild'],
419+
modifyWebpackConfig: function (config) {
420+
// Both packages declare `sideEffects: false`, which lets webpack
421+
// drop the side-effecting `--import` entry and report 0 bytes.
422+
// Keep side effects so this measures what Node really loads.
423+
config.optimization = { ...config.optimization, sideEffects: false };
424+
425+
return config;
426+
},
419427
},
420428
{
421429
name: '@sentry/node - without tracing',

0 commit comments

Comments
 (0)