question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global decleration not working

See original GitHub issue

Hi. I’m not sure if I’m missing something or now. I’m trying to declare this globally so I can use it in all of my vue template files.

In my main.js file I have the following.

import FontAwesomeIcon from '@fortawesome/vue-fontawesome'
import { faHdd } from '@forawesome/fontawesome-pro-light'

new Vue({
    computed: {
        hhd () {
            return faHdd
        }
    },
    components: { App, FontAwesomeIcon },
    router,
    store,
    template: '<App/>'
}).$mount('#app')

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
OriginalEXEcommented, Jan 18, 2018
3reactions
OriginalEXEcommented, Jan 14, 2018

Hi, please check how I did it here: https://codesandbox.io/s/n97705o5ml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a global variable in TypeScript - Stack Overflow
Create a global variable in TypeScript · // xx.d.ts declare var age: number // or // xx.ts // with or without declare keyword...
Read more >
Declaring Global Variables in TypeScript - Marius Schulz
Another approach is to declare a global variable using the declare var syntax. This way, we can let TypeScript know that it can...
Read more >
Documentation - Global .d.ts - TypeScript
When looking at the code of a global library, you'll usually see: Top-level var statements or function declarations; One or more assignments to...
Read more >
How to declare Global Variables in TypeScript | bobbyhadz
To declare a global variable in TypeScript, create a `.d.ts` file and use `declare global{}` to extend the global object with typings for...
Read more >
Declare variables as global - MATLAB global - MathWorks
If the global variable does not exist the first time you issue the global statement, it is initialized to an empty 0x0 matrix....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found