Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Jan 31, 2025

Description

https://www.loom.com/share/a83b5e44a6134af1a2ea9c7c7284b3c7?sid=6003dd84-7e0d-4e6f-a465-caba64e53f4e

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Enable HMR for webview in ClineProvider.ts using Vite, with configuration updates in vite.config.ts and package.json.

  • Behavior:
    • Enable HMR for webview in ClineProvider.ts by adding getHMRHtmlContent() and conditionally using it based on extensionMode.
  • Configuration:
    • Update vite.config.ts to include HMR settings with host as localhost and protocol as ws.
    • Change Vite version in package.json from ^6.0.5 to 5.3.3.

This description was created by Ellipsis for 9736795. It will automatically update as commits are pushed.

"ts-jest": "^27.1.5",
"typescript": "^4.9.5",
"vite": "^6.0.5"
"vite": "5.3.3"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Vite 6 changes the way HMR works, which breaks the example I was following. Will figure this out as a follow-up.

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

🔥

@mrubens mrubens merged commit 4aff012 into cte/shadcn-ui-storybook Jan 31, 2025
2 checks passed
@mrubens mrubens deleted the cte/vite-hmr branch January 31, 2025 01:15
@mrubens
Copy link
Collaborator

mrubens commented Jan 31, 2025

Sorry if I merged this incorrectly - I didn't look closely and thought it was ready for main

@cte cte changed the title Enable HMR for the webview, complements of vite Enable HMR for the webview, compliments of vite Feb 1, 2025
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