-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Classes duplicate in auto-complete as you save when using Tailwind JIT #316
Comments
Hey @negcx. Are you able to share a project repository that reproduces this? Also, which operating system, VS Code version, extension version, and package manager are you using? Thanks! |
Hi, I can confirm this bug with JIT + file watcher.
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
mode: 'jit',
purge: [
'./resources/views/**/*.blade.php',
],
theme: {
extend: {
fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography')
],
}; |
Is your project public @fredericseiler? Also when this is happening (duplicated completions) are you also seeing duplicated hover previews, diagnostics and/or color decorators? |
Some screenshots with a class conflict: (not quite sure what you mean by "diagnostics and/or color decorators") Unfortunately, the project I'm working on is private. I can quickly setup a public repo (with the Laravel framework) if you want, but the main things are:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "TAILWIND_MODE=build mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"@tailwindcss/forms": "^0.3.1",
"@tailwindcss/typography": "^0.4.0",
"alpinejs": "^2.7.3",
"laravel-mix": "^6.0.6",
"postcss": "^8.1.14",
"tailwindcss": "^2.0.1"
}
}
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require('tailwindcss'),
])
.version(); and the const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
mode: 'jit',
purge: [
'./resources/views/**/*.blade.php',
],
theme: {
extend: {
fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography')
],
}; |
So, I just restarted VSCode, and the bug seems to have vanished, even after several css rebuilds under watcher... 🤷♂️ |
I have just pushed out a potential fix for this in |
I tried everything to reproduce it, in vain. I suspect it happened while I was toggling JIT mode on/off with Laravel Mix file-watcher running, but then again, can't confirm it. |
hi, @bradlc .. I just installed v0.6.4 and everything seems to be working fine now. Thanks! |
Anyone still seeing this since |
I'm going to assume this is resolved then 🤞 If not please open a new issue, thanks! |
I expect this is related to using JIT. It seems each time you save, JIT generates a new stylesheet perhaps, and it is then pulled into the VS Code extension. After developing for an hour or so, VS Code starts grinding to a halt when you want to type a class name as it seems to have a massive list.
The text was updated successfully, but these errors were encountered: