Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [vuejs3]

Use this tag for questions specific to version 3 of Vue.js, an open-source, progressive Javascript framework for building user interfaces.

7 votes
3 answers
18k views

How to use any icons with Nuxt or Vue?

I'm facing an error with Nuxtjs when I try to use the vue-fontawesome framework and also the @nuxtjs/fontawesome framework, this is the error: [nuxt] [request error] Cannot read properties of ...
FRostri's user avatar
  • 397
73 votes
18 answers
100k views

Vue 3 Vite - dynamic image src

I'm using Vue 3 with Vite. And I have a problem with dynamic img src after Vite build for production. For static img src there's no problem. <img src="/src/assets/images/my-image.png" alt=...
Ondrej Vencovsky's user avatar
121 votes
10 answers
103k views

Vue.js 3 Event Bus

How to create Event Bus in Vue 3? In Vue 2, it was: export const bus = new Vue(); bus.$on(...) bus.$emit(...) In Vue 3, Vue is not a constructor anymore, and Vue.createApp({}); returns an object ...
KeyKi's user avatar
  • 3,083
14 votes
2 answers
12k views

Vue 3 reactivity not triggered from inside a class instance

Codepen: https://codepen.io/codingkiwi_/pen/XWMBRpW Lets say you have a class: class MyClass { constructor(){ this.entries = ["a"]; //=== example change triggered from INSIDE the ...
CodingKiwi's user avatar
174 votes
8 answers
200k views

Using Bootstrap 5 with Vue 3

I want to use Bootstrap 5 with Vue 3. As Bootstrap 5 uses vanilla JS (no JQuery), can I use Bootstrap 5 directly in a Vue 3 project (without using Bootstrap-Vue)? Can someone guide me how to use ...
Aditya Sharma's user avatar
253 votes
8 answers
129k views

ref vs reactive in Vue 3?

Looking at some examples of some people's preview tutorials for Vue 3. [Currently beta right now] I've found two examples: Reactive <template> <button @click="increment"> ...
Denis Tsoi's user avatar
  • 10.1k
84 votes
8 answers
161k views

Add global variable in Vue.js 3

How to add a global variable in Vue.js 3? In Vue.js 2 we use this in the main.js file: Vue.prototype.$myGlobalVariable = globalVariable
Adri HM's user avatar
  • 2,900
119 votes
8 answers
125k views

How can I use Vite env variables in vite.config.js?

With the following .env in my Vite project: # To prevent accidentally leaking env variables to the client, only # variables prefixed with VITE_ are exposed to your Vite-processed code VITE_NAME=...
Matt's user avatar
  • 9,978
22 votes
1 answer
30k views

VueJS/Typescript - Cannot find module './components/Navigation' or its corresponding type declarations

When I create a script as typescript (lang="ts") I get an error stating "Cannot find module './components/Navigation' or its corresponding type declarations (Vetur 2307).". I ...
thelandog's user avatar
  • 724
15 votes
4 answers
29k views

Vue 3: Is getCurrentInstance() deprecated?

I've seen references to getCurrentInstance() function on some old(?) documents and codes, but cannot find it in the current Vue 3 document. Is getCurrentInstance() deprecated? If so, what is the ...
zeodtr's user avatar
  • 11.1k
4 votes
1 answer
7k views

How to use microfrontends with Vue/Nuxt?

I wanted to know how to use Microfrontends with Nuxt or at least Vue. Is there a plug & play simple solution to have it working quickly? I've heard about Webpack's v5 ModuleFederationPlugin for ...
kissu's user avatar
  • 45.1k
16 votes
6 answers
24k views

Passing props to Vue root instance via attributes on element the app is mounted on

I am terribly new to Vue, so forgive me if my terminology is off. I have a .NET Core MVC project with small, separate vue pages. On my current page, I return a view from the controller that just has:...
Jonesopolis's user avatar
  • 25.3k
1 vote
4 answers
3k views

Why doesn't the component tag in Vue3 work properly for dynamically rendering components?

I'm just learning Vue and trying to learn dynamic rendering using the component tag. What is the problem with this code? No errors are displayed in the console, but clicking on the buttons still does ...
mrcrazyog's user avatar
25 votes
2 answers
26k views

Install vue 3.0 in laravel

Is there a way to install vue 3.0 to Laravel 8? When I run npm install vue@next It started installing Vue 3.0, but for some reason it also began installing vue-template-compiler v2.6.12. The ...
lightning_missile's user avatar
142 votes
14 answers
154k views

`Vue3 - Vite` project alias src to @ not working

I have installed the project with vue3 - vite importing a component like import Component from '../../../../components/Component.vue' i just want to alias the src folder and do import Component from '...
Oleksii Zelenko's user avatar

15 30 50 per page
1
2 3 4 5
47