Windi Analyzer not working on Nuxt Js.
rashidpathiyil opened this issue · comments
Rashid Pathiyil commented
VS Code Extension
From v0.8.0 of Windi CSS Intellisense, it has this analyser built-in.
- Open a project using Windi CSS in VS Code
- Open the Command Palette (⇧⌘P / Ctrl+Shift+P)
- Run command: Windi CSS: Run & Open Analysis
// 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
thfai2000 commented
VS Code Extension
From v0.8.0 of Windi CSS Intellisense, it has this analyser built-in.
- Open a project using Windi CSS in VS Code
- Open the Command Palette (⇧⌘P / Ctrl+Shift+P)
- Run command: Windi CSS: Run & Open Analysis
// 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
Rashid Pathiyil commented
I temporarily fixed it by changing this 'src/**/*.{vue,jsx,tsx,svelte}',
to '*/**/*.{vue,jsx,tsx,svelte}',
Diptesh Choudhuri commented
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'],
}