-
-
Couldn't load subscription status.
- Fork 28
feat(marketplace): add @dimano/ts-devtools-plugin-prefetch-heatmap #233
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
feat(marketplace): add @dimano/ts-devtools-plugin-prefetch-heatmap #233
Conversation
🦋 Changeset detectedLatest commit: a5aa2c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Updated with pluginId + logoUrl; ready for review.” |
| }, | ||
| // default export registers the plugin | ||
| pluginImport: { | ||
| importName: 'default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm did you test it, I can't remember if I added an edge case to cover the default import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I tested the default import path.
- The plugin exports a default factory:
// src/index.tsx
export default registerPrefetchHeatmapPlugin;
export { registerPrefetchHeatmapPlugin }; // also exported as a named fallback
- Package entry points resolve to dist/ with ESM exports:
{
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" } }
}
- I validated loading via dynamic import:
const mod = await import('@dimano/ts-devtools-plugin-prefetch-heatmap');
const factory =
(mod as any).default ?? (mod as any).registerPrefetchHeatmapPlugin;
console.assert(typeof factory === 'function');
// factory({ registerPanel, subscribeToEvents, sendToPage })
- The marketplace entry uses:
pluginImport: { importName: 'default', type: 'function' }
which works with the above.
If you have an edge case in the loader, this package also exposes the named export (registerPrefetchHeatmapPlugin) so you can switch importName to that without code changes on my side. I’m happy to flip the registry to the named import if you prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what I meant is did you try clicking on "add to devtools", this would form something like:
import { default } from "your-package";maybe it would be a better idea to change it to actually be the named export registerPrefetchHeatmapPlugin
|
View your CI Pipeline Execution ↗ for commit 1ff411b
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/devtools
@tanstack/devtools-client
@tanstack/devtools-ui
@tanstack/devtools-utils
@tanstack/devtools-vite
@tanstack/devtools-event-bus
@tanstack/devtools-event-client
@tanstack/react-devtools
@tanstack/solid-devtools
commit: |
🎯 Changes
Adds @dimano/ts-devtools-plugin-prefetch-heatmap to the Devtools Marketplace registry.
Title: Prefetch Heatmap
Description: Visualize TanStack Router prefetch wins vs. waste with an overlay + metrics panel.
Requires: @tanstack/react-router >= 1.0.0
Import type: default export (function)
Links: README, repo, npm
Tags: Router, Prefetch, Analytics, Overlay
✅ Checklist
[✓] I have followed the steps in the Contributing guide.
[✓] I have tested this code locally with pnpm test:pr.
🚀 Release Impact
Registry entry added
Links
Plugin (npm): https://www.npmjs.com/package/@dimano/ts-devtools-plugin-prefetch-heatmap
Reporter (npm): https://www.npmjs.com/package/@dimano/tsr-prefetch-reporter
Repo: https://github.com/dimitrianoudi/tanstack-prefetch-heatmap
README: https://github.com/dimitrianoudi/tanstack-prefetch-heatmap#readme