-
Notifications
You must be signed in to change notification settings - Fork 208
Description
Hi there,
Excellent framework and REPL library. I'm an enthusiastic user of Vue. I'm authoring a library of vue components to be used in many projects in my company. I'm using the "@vue/repl" to create a documentation page where de lib components are loaded and presented with live examples. Below is a draft of such a page.
I also intend to use this playground to do incremental development of the components watching the behavior on the documentation page as I enhance the actual lib component. In that use case, I don't want to use the imports map to point to library code in a repository while developing locally. That's because the publish code is not the one I want to import the components. I want to import the component's local version. But I don't know how to do that.
I created a WPlaygroung component and imaged I could create some global scope for every REPL with the lib code
<script setup>
import { Repl } from "@vue/repl";
import CodeMirror from "@vue/repl/codemirror-editor";
import "@vue/repl/style.css";
defineProps({
exampleCode: {
type: String,
default: null,
},
});
</script>
<template>
<Repl :editor="CodeMirror" />
</template>
Can you help me figure out a way to inject the library components and functions in the REPL scope without using a CDN but referencing the local code I'm working on?
Thanks a lot,
JM