-
Notifications
You must be signed in to change notification settings - Fork 131
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
Possible to use this from CDN? #123
Comments
Do you mean #2 ? |
That worked, thank you - but I'd like to use Vue 3. Please forgive me if I'm missing something obvious but this is just one implementation I've tried: <!DOCTYPE html>
<head>
<script src="https://unpkg.com/vue@3.0.2"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@2.0.2/lib/vue-json-pretty.min.js"></script>
</head>
<body>
<div id="app">
<vue-json-pretty :data="jsonData"></vue-json-pretty>
</div>
<script>
const app = Vue.createApp({
data() {
return {
jsonData: { "country": "Germany", "capital": "Berlin", "currency": "Euro" }
}
}
})
app.component('VueJsonPretty', VueJsonPretty.default)
app.mount('#app')
</script>
</body>
</html> Errors:
|
@dsottimano <script src="https://unpkg.com/vue@3.0.2"></script>
<script>window.vue = Vue</script>
<script src="https://cdn.jsdelivr.net/npm/vue-json-pretty@2.0.2/lib/vue-json-pretty.min.js"></script> |
I would have never figured that out, thank you very much. Would you like me to make a PR to update the readme with these 2 code snippets and a link to your demo ? I bet it would help quite a few people. Also, where can I add in feature requests? |
Yeah, You can add a description in REDME, such as |
I'm using CDN implementation for Vue 3 and would like to include your component also using CDN (https://www.jsdelivr.com/package/npm/vue-json-pretty?version=2.0.2).
How might I do this?
The text was updated successfully, but these errors were encountered: