Skip to content
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: add chobitsu (Chrome Devtools) for preview #201

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

tachibana-shin
Copy link

Resolves: #197

Copy link

vercel bot commented Jan 3, 2024

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

Name Status Preview Comments Updated (UTC)
repl ❌ Failed (Inspect) Jan 3, 2024 7:59pm

@tachibana-shin
Copy link
Author

Can you tell me why vercel preview is failing?

image

Copy link
Member

@yyx990803 yyx990803 left a comment

Choose a reason for hiding this comment

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

This seems to load the entire devtools frontend which is pretty heavy. I think at the very least it should be added as an opt-in feature that doesn't affect the bundle size of the current base use case (embedding).

package-lock.json Outdated Show resolved Hide resolved
src/monaco/Monaco.vue Outdated Show resolved Hide resolved
src/editor/types.ts Outdated Show resolved Hide resolved
src/monaco/highlight.ts Outdated Show resolved Hide resolved
vite.config.ts Outdated Show resolved Hide resolved
<meta name="referrer" content="no-referrer" />
<script
type="module"
src="https://cdn.jsdelivr.net/npm/chii/public/front_end/entrypoints/chii_app/chii_app.js"
Copy link
Member

Choose a reason for hiding this comment

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

This would make this feature require a network connection.

Currently the repl doesn't use CDN unless the user is selecting a published version of Vue. If a feature requires internet connection then it should be made opt-in.

Copy link
Author

Choose a reason for hiding this comment

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

I added a chii option in Repl to replace origin when deploying to load chii resources. A small plugin for vite has also been added to load the value for chii

import VitePluginChii from '@vue/repl/plugin-chii'
import chii from 'virtual:chii'

function App() {
  return <Repl chii={chii} ... />
}

@tachibana-shin
Copy link
Author

This seems to load the entire devtools frontend which is pretty heavy. I think at the very least it should be added as an opt-in feature that doesn't affect the bundle size of the current base use case (embedding).

Should I add a separate Repl component for chobitsu's mode instead of integrating it into 1 component?

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.

Suggest using chobitsu to do devtools
2 participants