windi.config.js is not reloaded correctly (e.g. colors are not updated in the suggestion)
See original GitHub issueConsider this windi.config.js file
import { defineConfig } from 'windicss/helpers';
import colors from 'windicss/colors';
export default defineConfig({
darkMode: 'class', // or 'media'
theme: {
colors: {
color1: "#33FF9D",
color2: "#33FF9D",
color3: "#33FF9D",
color4: "#33FF9D",
},
fontFamily: {
semibold: ['SofiaSemiBold', 'sans-serif'],
light: ['SofiaLight', 'sans-serif'],
bold: ['SofiaBold', 'sans-serif'],
regular: ['SofiaRegular', 'sans-serif'],
medium: ['SofiaMedium', 'sans-serif']
},
},
})
This should overwrite the default colours from windi, which it does and they do work in production. However the plugin still suggests the original windicss colours and doesn’t suggest these new ones. Any ideas why that is ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Configuring Windi CSS
By default, Windi CSS will search for the configuration file under your project's root. Valid filenames are: windi.config.ts; windi.config.js ...
Read more >My TailWind CSS Intellisense plugin just isn't working on my ...
I'm using tailwindcss in a react app. Tailwindcss Intellisense plugin was not working in my VSCode but then i installed HTML CSS Support ......
Read more >Releases - NocoDB Documentation
Previously deleting a column that is referenced by a formula would throw an error and all data will be not shown when calling...
Read more >vscode-tailwindcss - Bountysource
Created 1 year ago in tailwindlabs/tailwindcss-intellisense with 0 comments. I wrote this colors in windi.config.cjs: module. ... config.cjs`: ```JS /** @type { ...
Read more >awesome-windicss - npm
If you find some plugin that you used is not yet supported, ... windi.config.js const { transform } = require('windicss/helpers'); ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey!
Wanted to experiment with WindiCSS but experienced the same issues as mentioned above and therefore stopped working with it. 😢 (Mac, M1 Pro; I tested with both the current version and the pre-release; I tested with all
(windi|tailwind).config.(js|ts)
)I experienced another strange problem that somehow feels connected, maybe that helps you with debugging: I had two projects open at the same time in two different windows, both using WindiCSS. Most of the time added colors etc. didn’t show up, even after reloading the window – strange enough, at one point I saw (old) suggestions from the project of the other window, but not the suggestions of the current project. Even after several reloads and even after the colors where removed in both projects, they still appeared in the wrong project.
It feels like some strange caching behaviour or similar…?
This feels somehow connected to https://github.com/windicss/windicss-intellisense/issues/287
Yeah. It’s a caching issue. I’ve tried to implement a new loading logic in the newest pre-release version v0.23.5. Hope that helps. Will see.