windicss-intellisense: Error loading config with `Auto Rename Tag` installed
Problem: extension cant load the config file and thus doesn’t work at all. If I use version 0.11.7 this error doesn’t occur. Only happens if I upgrade.
Extension version: 0.15.1 Extension initial output:
⚠ WARN: SyntaxError: Unexpected token � in JSON at position 0
Windi CSS Intellisense is now active!
Output after I modify the config file (windi.config.ts)
⚠ WARN: SyntaxError: Unexpected token � in JSON at position 0
Windi CSS Intellisense is now active!
⚠ WARN: TypeError: Cannot read property 'visitors' of undefined
⚠ WARN: SyntaxError: Unexpected token � in JSON at position 0
⚠ WARN: Error: undefined: Must export a default export when using ES6 modules.
e:\Projects\Collaborations\vocal-web-app\windi.config.ts:0:0
Config file: (windi.config.ts)
import { defineConfig } from 'windicss/helpers';
export default defineConfig({
darkMode: false,
theme: {
fontFamily: {
sans: ['Inter', 'Roboto', 'sans-serif']
},
extend: {
colors: {
accent: '#6366f1'
},
textColor: {
default: '#202020',
'default-light': '#454545',
inverse: '#fff'
},
backgroundColor: {
default: '#f8f6f5',
'default-elevated': '#fff',
inverse: '#000'
}
}
},
});
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (10 by maintainers)
Can confirm, once I deactivated the
Auto Rename Tag by Jun Hanit worked for me again./cc @windicss/windicss tagging this as
need guidance&upstreamsince it seems that the 3rd party extensionAuto Rename Tag, hooks into something. I truly have no idea how to fix this, or what caused this issue, as far as I can tell, we use native VS Code API, the way it is documented.I think I may have found the cause (for me at least). It was the extension
Auto Rename Tag by Jun Han. I found lines in prettier output that said it couldn’t load and parse a JSON in that extension’s folder. I disabled it and the WindiCSS extension started to work. @eggsy do you also use this extension (Auto Rename Tag)?