Skip to content

Conversation

@wangcch
Copy link
Collaborator

@wangcch wangcch commented Jan 24, 2025

You can control the preview yourself without loading the editor.

  1. Separate Sandbox from Preview
  2. Export Sandbox component
import { Sandbox, useStore } from '@vue/repl'

const store = useStore(
  {
    vueVersion: ref('3.5.13'),
  },
  location.hash,
)

return () => h(Sandbox, { store })

@vercel
Copy link

vercel bot commented Jan 24, 2025

@wangcch is attempting to deploy a commit to the vuejs Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repl ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 13, 2025 1:54pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 13, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@vue/repl@309

commit: 94b9930

@wangcch
Copy link
Collaborator Author

wangcch commented Feb 14, 2025

#2
We could use the Sandbox component alone as a readonly preview of a project.

@edison1105
Copy link
Member

edison1105 commented Feb 16, 2025

LGTM
I think it's nice to have documentation for using Sandbox under README.md > ## Advanced Usage so users can refer to it.

@wangcch wangcch force-pushed the feat-export-sandbox branch from 8c14286 to 373659a Compare February 16, 2025 16:04
@wangcch wangcch force-pushed the feat-export-sandbox branch from 373659a to 94b9930 Compare February 16, 2025 16:05
@edison1105 edison1105 merged commit b549715 into vuejs:main Feb 17, 2025
2 of 3 checks passed
@edison1105
Copy link
Member

@wangcch Could we close #2 now?

@wangcch
Copy link
Collaborator Author

wangcch commented Feb 17, 2025

@wangcch Could we close #2 now?

I think it's OK 🙋‍♂️

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.

2 participants