Skip to content

fix(solidstart): Use nitro module for build hooks to preserve preset hooks#20861

Merged
andreiborza merged 1 commit into
developfrom
ab/solidstart-aws-streaming
May 13, 2026
Merged

fix(solidstart): Use nitro module for build hooks to preserve preset hooks#20861
andreiborza merged 1 commit into
developfrom
ab/solidstart-aws-streaming

Conversation

@andreiborza
Copy link
Copy Markdown
Member

@andreiborza andreiborza commented May 13, 2026

Previously, to move the instrumentation file to the build output we added a rollup:before hook via nitro's server.hooks. This however overrides any nitro preset-defined hooks.

Any preset that defines such a hook, has their hook not run. Notably, the aws-preset sets up rollup:before to switch the entry files when using aws lambda streaming.

The fix is to move our hook logic into our own nitro module, which then runs additvely on top of all the other hooks that have been defined by other presets.

Closes: #20857

…hooks

Previously, to move the instrumentation file to the build output we added a
`rollup:before` hook via nitro's `server.hooks`. This however overrides any
nitro preset-defined hooks.

Any preset that defines such a hook, has their hook not run. Notably, the
`aws-preset` sets up `rollup:before` to switch the entry files when using aws
streaming.

The fix is to move our hook logic into our own nitro module, which then runs
additvely on top of all the other hooks that have been defined by other presets.

Closes: #20857
@andreiborza andreiborza requested a review from a team as a code owner May 13, 2026 07:40
@andreiborza andreiborza marked this pull request as draft May 13, 2026 07:40
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 26.87 kB - -
@sentry/browser - with treeshaking flags 25.3 kB - -
@sentry/browser (incl. Tracing) 44.77 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 46.74 kB - -
@sentry/browser (incl. Tracing, Profiling) 49.76 kB - -
@sentry/browser (incl. Tracing, Replay) 84.4 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 73.83 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 89.1 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 101.74 kB - -
@sentry/browser (incl. Feedback) 44.05 kB - -
@sentry/browser (incl. sendFeedback) 31.68 kB - -
@sentry/browser (incl. FeedbackAsync) 36.79 kB - -
@sentry/browser (incl. Metrics) 27.95 kB - -
@sentry/browser (incl. Logs) 28.1 kB - -
@sentry/browser (incl. Metrics & Logs) 28.78 kB - -
@sentry/react 28.62 kB - -
@sentry/react (incl. Tracing) 47.03 kB - -
@sentry/vue 31.79 kB - -
@sentry/vue (incl. Tracing) 46.64 kB - -
@sentry/svelte 26.89 kB - -
CDN Bundle 29.25 kB - -
CDN Bundle (incl. Tracing) 47.16 kB - -
CDN Bundle (incl. Logs, Metrics) 30.62 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.28 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 69.96 kB - -
CDN Bundle (incl. Tracing, Replay) 84.54 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 85.62 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.36 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 91.46 kB - -
CDN Bundle - uncompressed 86.03 kB - -
CDN Bundle (incl. Tracing) - uncompressed 141.48 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 90.22 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 144.94 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 215.05 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 260.19 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 263.64 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 273.89 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 277.33 kB - -
@sentry/nextjs (client) 49.55 kB - -
@sentry/sveltekit (client) 45.26 kB - -
@sentry/node-core 60.83 kB +0.02% +10 B 🔺
@sentry/node 165.97 kB +0.01% +9 B 🔺
@sentry/node - without tracing 73.95 kB +0.01% +4 B 🔺
@sentry/aws-serverless 108.06 kB +0.01% +5 B 🔺
@sentry/cloudflare (withSentry) - minified 170.63 kB - -
@sentry/cloudflare (withSentry) 430.41 kB - -

View base workflow run

@andreiborza andreiborza marked this pull request as ready for review May 13, 2026 08:07
@andreiborza andreiborza merged commit d8e4d24 into develop May 13, 2026
46 checks passed
@andreiborza andreiborza deleted the ab/solidstart-aws-streaming branch May 13, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@sentry/solidstart withSentry breaks SolidStart aws-lambda streaming responses

2 participants