Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Import css in plugin vue

I want to import css in my plugin vue if a variable is true but when what i have do, load css after app was mount

Install.js of my plugin

import FormGroup from './components/formGroup/FormGroup.vue'
export default {
    async install(Vue, variable) {
        if(variable)
            await import('./styles/common/input.css')
        Vue.component('lv-form-group', FormGroup)
    }
}

My main.js of my vue project :

import { createApp } from 'vue'
import App from './App.vue'
import router from './router/router.js'
import i18n from './translations/i18n.js'
import './styles/_import.css'
import lightVue from './install'
const app = createApp(App)

app.use(lightVue, true)
app.use(router)
app.use(i18n)
app.mount('#app')

When i run my app, the style is applied after my app mount

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!