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

Documentation example do not work with Vue 3 cli #368

Closed
codigoisaac opened this issue May 1, 2022 · 1 comment
Closed

Documentation example do not work with Vue 3 cli #368

codigoisaac opened this issue May 1, 2022 · 1 comment

Comments

@codigoisaac
Copy link

codigoisaac commented May 1, 2022

The readme describes the setting up of vue-fontawesome in a way that doesn't seem to work anymore with Vue3 cli.

The Readme says:

import Vue from 'vue'
import App from './App'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faUserSecret } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

library.add(faUserSecret)

Vue.component('font-awesome-icon', FontAwesomeIcon)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>'
})

But this generates the error:

ReferenceError
Vue is not defined

Sem título

Reproducible test case
https://codesandbox.io/s/font-awesome-vue-docs-example-dont-work-ixgbuf?file=/src/main.js

Additional context
In my project, what I do for vue-fontawesome to work is

createApp(App).component('font-awesome-icon', FontAwesomeIcon).use(router).mount('#app')
@jasonlundien
Copy link
Member

Hi @codigoisaac -- we have updated our docs for Vue 3. You can check them out here. I will go ahead and close this issue. If you feel that it needs to remain open just let me know.

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

2 participants