Skip to content

feat(build): Add args and templates to rollup debugger plugin #5085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

lobsterkatie
Copy link
Member

This makes two improvements to the rollup debugging plugin, which allows you to stick a breakpoint into any phase of the build process:

  • It now collects the arguments passed to the hook function for that phase, so they can be examined in the debugger.
  • The docstring now includes pre-built copies of the plugin (or, rather, calls to the plugin factory function) for every hook, so you can just copy any that you need over into the helper functions which create the rollup config.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.78 KB (-6.77% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 58.38 KB (-9.65% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.54 KB (-6.99% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 52.61 KB (-9.26% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.33 KB (-16.83% 🔽)
@sentry/browser - Webpack (minified) 61.47 KB (-24.77% 🔽)
@sentry/react - Webpack (gzipped + minified) 19.35 KB (-16.87% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.81 KB (-10.91% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.43 KB (-6.31% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23 KB (-6.06% 🔽)

*
* @param hookName The name of the hook at which to pause.
* @returns A plugin which inserts a debugger statement in the phase represented by the given hook
*
* For convenience, here are pre-built debuggers for every hook:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What? I'm lazy. Typing is hard. 😛

@lobsterkatie lobsterkatie merged commit e39b3f6 into 7.x May 12, 2022
@lobsterkatie lobsterkatie deleted the kmclb-add-args-and-templates-to-rollup-debugger-plugin branch May 12, 2022 08:20
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 12, 2022
AbhiPrasad pushed a commit that referenced this pull request May 30, 2022
This makes two improvements to the rollup debugging plugin, which allows you to stick a breakpoint into any phase of the build process:
- It now collects the arguments passed to the hook function for that phase, so they can be examined in the debugger.
- The docstring now includes pre-built copies of the plugin (or, rather, calls to the plugin factory function) for every hook, so you can just copy any that you need over into the helper functions which create the rollup config.
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.

3 participants