Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

110
Vistas
Best SCSS organization approach in Vue.js

I'm new with Vue.js.

I have to implement a small web-application and I took the opportunity to study and take familiarity with Vue.js.

I have a doubt about the styles.

First of all I would like to use SCSS and I configured my project in this way: I created some scss files about the commons rules (eg buttons, media queries, etc). All files are included into a single file shared.scss

In order to avoid to include it a lot of time I added this configuration into the file vue.config

module.exports = {
  css: {
    loaderOptions: {
      scss: {
        additionalData: `@import "@/assets/styles/_shared.scss";`
      }
    }
  }
}

For each component (as also for my app.vue) I have a dedicated style tag where I put the scss rules related to the specific component:

<style lang="scss" scoped>

Is this a valid approach? Could it be better/possible to include a scss file for each component? What's the approach that it's used for production projects?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda