v-cloak works in dev but fails in production

119 Views Asked by At

I'm having an issue with the v-cloak directive in Vue.js. I'm using Vue.js 3 + Symfony in API mode and I want to implement a small loader between page loads. However, it works perfectly fine in development, but not in production, meaning when I've built the application. I should mention that I'm only talking about the front-end at the moment.

Firstly, I used v-cloak directly in the HTML template containing the entry point of my application: it's a simple tag. I defined a CSS style directly in the template for simplicity.

index.html

the loader

It's works fine in dev :

enter image description here

The loader is working well during the loading of all my applications files. Nothing is build for the moment, the fils are loaded one by one.

But in production, the build seems bypass the v-cloak.

Is there a way to fix the issue ?

I would like to manage the loader globally, rather than on a per-component basis using hooks.

thanks

0

There are 0 best solutions below