Skip to content
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

not working with CDN #1162

Closed
allofmeng opened this issue Feb 3, 2025 · 3 comments
Closed

not working with CDN #1162

allofmeng opened this issue Feb 3, 2025 · 3 comments
Assignees

Comments

@allofmeng
Copy link

Case:
I am trying out tailwind css using CDN on a 1 page html, I installed the vs code plug in today and at the output it showed me :

[Info - 5:48:18 PM] [GLOBAL] No matching project for document {

fsPath: '/Users/markc/Documents/tailtest/tailwind.config.js',

normalPath: '/Users/markc/Documents/tailtest/tailwind.config.js'

}

Directory :
only 2 files
test01.html
tailwind.config.js

I would like to know what I should do to get intelliSense working ?
Thank you !

What version of VS Code are you using?

v1.96.4

What version of Tailwind CSS IntelliSense are you using?

v0.14.2

What version of Tailwind CSS are you using?

version":"4.0.3"
What package manager are you using?

npm

What operating system are you using?

Mac

Tailwind config
#I am testing a html using cdn , and I created an empty config.js file.

intelliSense setting

{ "workbench.colorTheme": "Default High Contrast",

"[tcl]": {},

"tcl.interpreterPath": "/Users/markc/Downloads/tcl9.0.0/macosx/configure",

"diffEditor.codeLens": true,

"geminicodeassist.project": "applied-shade-442902-b8",

"tailwindCSS.emmetCompletions": true,

"tailwindCSS.experimental.configFile": null,

"tailwindCSS.includeLanguages": {"html": "html","javascript": "javascript","css": "css"},

"editor.quickSuggestions": {

"strings": "on",

"comments": "inline"

},

"editor.inlineSuggest.enabled": true,

"files.associations": {

"*.css": "tailwindcss"

},}

@thecrypticace thecrypticace self-assigned this Feb 3, 2025
@allofmeng
Copy link
Author

Unfortunately I had to downgrade to v3 in order to have it work for now.
But I am looking forward to use v4 with intellisense :)

@thecrypticace
Copy link
Contributor

thecrypticace commented Feb 4, 2025

I have some ideas on how to make IntelliSense support the v4 CDN properly but it'll be a bit before I can make that work. However, I did merge support for using v4 in projects that don't have it installed via npm. Once I tag the new version you can put the following in a CSS file (even if you don't otherwise use it):

@import "tailwindcss";

and it'll pick up the project as a v4 project. I'm aiming to tag the new release either today or tomorrow.

@thecrypticace
Copy link
Contributor

This shipped last week btw:

Image

I do want to improve support for the CDN more properly like detecting <style type="text/tailwindcss"> tags and using them but that will require a more significant refactoring before that's feasible.

I've added that idea to our backlog though to look into. Gonna close this one as there is at least a way to do this now. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants