windicss / windicss-analysis

🔍 A visual analyzer for Windi CSS

Home Page:https://analysis-demo.windicss.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windi Analyzer not working on Nuxt Js.

rashidpathiyil opened this issue · comments

VS Code Extension
From v0.8.0 of Windi CSS Intellisense, it has this analyser built-in.

  1. Open a project using Windi CSS in VS Code
  2. Open the Command Palette (⇧⌘P / Ctrl+Shift+P)
  3. Run command: Windi CSS: Run & Open Analysis
    image
// windi.config.js

const typography = require('windicss/plugin/typography')
const aspect_ratio = require('windicss/plugin/aspect-ratio')

module.exports = {
    darkMode: 'class',
    plugins: [typography, aspect_ratio],
    theme: {
        extend: {
            colors: {
                primary: "#0074D9",
            },
        }
    },
    // Website not working when adding this👇
    extract: {
    include: [
      'src/**/*.{vue,jsx,tsx,svelte}',
      'shared/**/*.{vue,ts}',
    ],
  }
}

Running

Nuxt @ v2.15.7
windicss@3.1.3

VS Code Extension
From v0.8.0 of Windi CSS Intellisense, it has this analyser built-in.

  1. Open a project using Windi CSS in VS Code
  2. Open the Command Palette (⇧⌘P / Ctrl+Shift+P)
  3. Run command: Windi CSS: Run & Open Analysis
    image
// windi.config.js

const typography = require('windicss/plugin/typography')
const aspect_ratio = require('windicss/plugin/aspect-ratio')

module.exports = {
    darkMode: 'class',
    plugins: [typography, aspect_ratio],
    theme: {
        extend: {
            colors: {
                primary: "#0074D9",
            },
        }
    },
    // Website not working when adding this👇
    extract: {
    include: [
      'src/**/*.{vue,jsx,tsx,svelte}',
      'shared/**/*.{vue,ts}',
    ],
  }
}

Running

Nuxt @ v2.15.7
windicss@3.1.3

Same for me, even when I use 'npx windicss-analysis'. No utilities detected.
Mine:
Nuxt @v2.15.6
windicss@3.1.3

I temporarily fixed it by changing this 'src/**/*.{vue,jsx,tsx,svelte}', to '*/**/*.{vue,jsx,tsx,svelte}',

That is the actual fix since there is no src directory in Nuxtjs. I personally have this in my windi config:

 extract: {
    include: ['**/*.{vue,html,jsx,tsx}'],
    exclude: ['node_modules', '.git', 'dist', 'personal'],
  }