fix: replace defineHandler with defineEventHandler#2102
fix: replace defineHandler with defineEventHandler#2102Sigmabrogz wants to merge 3 commits intosolidjs:mainfrom
Conversation
Resolves an issue where npm init solid@latest generates an unbuildable template because h3 no longer exports defineHandler. defineEventHandler is the modern API. Signed-off-by: Sigmabrogz <bnb1000bnb@gmail.com>
✅ Deploy Preview for solid-start-landing-page ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 6dc2af8 The changes in this PR will be included in the next version bump. 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 |
commit: |
|
I've added the changeset as requested. |
|
Hi maintainers, I've added the changeset as requested. The PR is ready for review. Would appreciate a review when you have time. Thanks! |
| options: HandlerOptions | ((context: PageEvent) => HandlerOptions | Promise<HandlerOptions>) = {}, | ||
| ) { | ||
| const handler = defineHandler({ | ||
| const handler = defineEventHandler({ |
There was a problem hiding this comment.
is there a reason for this change? Is the old one deprecated?
There was a problem hiding this comment.
As the PR description says, H3 no longer exports defineHandler
There was a problem hiding this comment.
I'm confused, migration to v2 says to use defineHandler => https://h3.dev/migration#handler-utils
Fixes #2101
h3no longer exportsdefineHandler. It was replaced bydefineEventHandler. This updates the import and usage in@solidjs/startso that the generated template is buildable.