DEV Community

Muhamad Jamil
Muhamad Jamil

Posted on

Resolving problem with vue tailwind and postcss nesting

Previously I made an application with vue js and tailwind

because i'm used to using nesting feature in sass, i want to use it again in tailwind

quite simple, I just need to add the tailwindcss/nesting
plugin to postcss.config.js

Read More

here my postcss.config.js

module.exports = {
  plugins: {
    'postcss-import': {},
    'tailwindcss/nesting': {},
    tailwindcss: {},
    autoprefixer: {},
Enter fullscreen mode Exit fullscreen mode

everything was working fine until i found that vscode reads nesting and @apply as error

After hours of searching for an answer I can finally draw a conclusion.

first i need to change the lang style in vue to postcss,
<style lang="postcss">

the error warning is gone, but the syntax highlighting is not showing, after reading the same problem on github

and after read this comment

i replaced the postcss extension with

All done, error warning gone and the syntax highlighting comeback

if you guys have the same problem and have another method to solve, feel free to share

thanks for reading

Top comments (3)

bgrand_ch profile image
Benjamin Grand


ryansantos profile image
Ryan Santos

Thanks ❤

cn-2k profile image

Ty, works like a charm!