Unknown utility "bg-sky-800" in Twind
See original GitHub issueHello,
I upgraded to version 1.1 and start getting this error (was not present in last version):
my twind.config.ts:
import { Options } from "$fresh/plugins/twind.ts";
import * as colors from "twind/colors";
export default {
selfURL: import.meta.url,
darkMode: "class",
mode: "silent",
theme: {
extend: {
colors,
},
},
} as Options;
deno 1.25.0 (release, x86_64-pc-windows-msvc)
v8 10.6.194.5
typescript 4.7.4
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:6 (2 by maintainers)
Top Results From Across the Web
baby bags for twins - Amazon.com
Diaper Bag Backpack, Lepito Expandable Extra Large Capacity Baby Travel Bag Pack, Big Nappy Organizer for Twins, Waterproof Mommy Bag, with Convertible Dry...
Read more >10 Best Diaper Bag Backpacks for Parents of Twins
Diaper bag backpacks are a must-have for twin parents who have to carry two of everything. Check out our list of the 10...
Read more >Bags - Minnesota Twins - MLB Shop
Shop for Minnesota Twins bags at the official online store of Major League Baseball. Browse a wide selection of Twins backpacks, luggage, handbags, ......
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 FreeTop 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
Top GitHub Comments
Yes, the comment here gives the workaround: https://github.com/tw-in-js/vscode-twind-intellisense/issues/18#issuecomment-1264023267 but it isn’t totally clear in the details.
On the latest version of fresh what you need to do is:
remove
selfUrl
from/twind.config.ts
remove the import of
Options
from$fresh/plugins/twind.ts
.apply a type to the default export via JSDoc like this:
Modify the
start
arguments inmain.ts
to look like this:Then configuration changes to the
/twind.config.ts
should be reflected in the intellisense in the plugin (at least they have for me).What appears to be going on is that when the fresh twind gets pulled in, it is “overriding” the inferred types that the
vscode-twind-intellisense
gets from the twind config, meaning only “built in” values are checked. By excluding the hard import and using the JSDoc “type import” it seems to free up the plugin to properly infer the config.I am not totally sure how easy it would be to make this the default @lucacasonato. I might take a look later, but it does seem to be a bit of a friction point and seems to be a common pattern to adjust your twind config.
This happens to all custom theme values.
It seems that the default theme is always used for linting and intellisense, even though it has been overwritten.