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

112
Vistas
My PostCSS plugin does not work in a Vue-cli 3 project

so I wrote this postcss plugin that I'm trying to make use of. I tested it according to the postcss guidelines, and it worked as expected until I attempted to use it in an actual project.

Here's the plugin on GitHub

I'm trying to use it in a Vue-cli app (Webpack).

I installed the plugin with npm install. I have postcss & postcss-loader installed too (Ive tried different versions, reinstalling, but no luck)

Here's my postcss.config.js

module.exports = {
  plugins: [
    require("postcss-vwh"),
    //...
  ],
};

Update

Ok, so I created a new minimal application (without vue, only Webpack 5, css-loaders including latest version of postcss and the plugin) and it worked as expected!

So apparently the problem is not with my plugin after all, but with vue-cli. After hours of trying to make it work, I'm left with this error message:

Syntax Error: Error: PostCSS plugin postcss-vwh requires PostCSS 8.

Research shows that this error can be fixed by upgrading postcss-loader, but I'm forced by vue-cli to use version 4, which is the last version compatible with Webpack 4, on which my vue-cli app runs.

So, is there any way to make my plugin not as demanding maybe make it require lower version of postcss, so it can be used with Webpack 4?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

So I got an answer from creator of PostCSS here, which basically said, it's not recommended to try and support older postcss versions. Best approach is to update postcss.

So what I did was say bye-bye to vue-cli, manually created a new Webpack 5 / vue app from scratch, copied all my stuff there, installed postcss 8 and now it's working.

about 4 years ago · Juan Pablo Isaza Denunciar
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