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

Not working on vue js 3 #13

Open
takefy-dev opened this issue Jun 27, 2021 · 4 comments
Open

Not working on vue js 3 #13

takefy-dev opened this issue Jun 27, 2021 · 4 comments

Comments

@takefy-dev
Copy link

Hey why is the package is not working on vue 3 ?

@banocean
Copy link

banocean commented Jul 3, 2021

@takefy-dev
Copy link
Author

try https://www.npmjs.com/package/@discord-message-components/vue

still not working lol

@takefy-dev
Copy link
Author

in vue 2 it's wokring but the package in vue 3 i got this error This dependency was not found:

  • @discord-message-components/vue/styles in ./src/main.js

To install it, you can run: npm install --save @discord-message-components/vue/styles

@Danktuary
Copy link
Owner

Danktuary commented Aug 4, 2021

Hey @takefy-dev! This package is intended to work with only Vue 2, but @discord-message-components/vue does work for Vue 3. That package will also eventually work for Vue 2, and then this package will be archived.

To install the Vue 3 version, try the following:

yarn add @discord-message-components/vue

And then in your main.js:

import { createApp } from 'vue'
import { install as DiscordMessageComponents } from '@discord-message-components/vue'
import App from './App.vue'
import '@discord-message-components/vue/dist/style.css'

const app = createApp(App)

// Only necessary if you want to provide plugin options
app.use(DiscordMessageComponents, { /* ... */})`

app.mount('#app')

There is actually an error in the README's for that project; The import @discord-message-components/vue/styles' lines should be import @discord-message-components/vue/dist/style.css. The former will work if you use a bundler like Vite (afaik), but the latter will work anywhere. Try it out and let me know, thanks!

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

No branches or pull requests

3 participants