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

111
Views
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 answers
Answer question

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 Report
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!