question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

windi.config.js is not reloaded correctly (e.g. colors are not updated in the suggestion)

See original GitHub issue

Consider 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:open
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mariohamanncommented, Apr 17, 2022

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

1reaction
alexanderniebuhrcommented, Apr 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found