feat: add vite devtools integration with playground#102
feat: add vite devtools integration with playground#102arashsheyda wants to merge 7 commits intocomarkdown:mainfrom
Conversation
|
@arashsheyda is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
comark
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
|
@farnabaz @atinux trying to add vite devtools support here: the vue package has a vite entry so we can include the devtools there, but the others (like svelete or react) they don't have that entry so I thought user can incldue the devtools as a plugin... does that makes sense? or do we want to add vite entries for those packages as well current example usage for react: import { DevTools } from '@vitejs/devtools'
import { comarkDevtools } from 'comark/vite'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [
DevTools(),
react(),
comarkDevtools(),
],
}) |
|
Would you be happy to share a video about the devtools here @arashsheyda ? |
|
sure, @atinux you mean like this? Screen.Recording.2026-04-16.at.2.43.07.PM.mov |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Nice Work 👍
Not sure what is the best way achieve this 🤔 Maybe we can provide global utility for dev mode. |
|
May be wild but:
Of course this only works for Vue. Maybe @antfu could help us on this and finding best universal solution 👼 |
|
I am working on the utilities/infra for DevTools kit to work on the hosted website: vitejs/devtools#294 which might benefit this PR |
Description
Note
Requires Vite 8+ (DevTools Kit uses the plugin.devtools hook
introduced in Vite 8).
closes #9
this PR adds support for vite devtools integration with playground.
Usage:
check out https://github.com/comarkdown/comark/pull/102/changes#diff-0bffb03d8c49a00cae04014114b0d848afea2cddf16768a45ce13291919735bd
How to test
Install dependencies from the repo root:
Run the Vue + Vite example (already configured with
@vitejs/devtools):Open the app in the browser. the DevTools floating panel should appear at the bottom of the page. Click the Comark icon in the dock to open the playground iframe.