Skip to content

Conversation

zhe-he
Copy link
Contributor

@zhe-he zhe-he commented Aug 14, 2025

To ignore warnings when using the CDN, just add no-warn.
No src check was added since the CDN URL might vary (e.g., not always https://cdn.tailwindcss.com).

<script src="https://cdn.tailwindcss.com" no-warn></script>

#18731

@zhe-he zhe-he requested a review from a team as a code owner August 14, 2025 05:45
@wongjn
Copy link
Collaborator

wongjn commented Aug 14, 2025

FYI, https://cdn.tailwindcss.com is the v3 CDN, which is different to the @tailwindcss/browser package. This PR would only affect the latter, not the former.

You probably shouldn’t use this in production but people are going to anyways. Also there’s no way to drop this warning if someone `import`s this package when using NPM
@thecrypticace thecrypticace changed the title Add configuration to ignore CDN warnings Drop warning from browser build Aug 14, 2025
@thecrypticace thecrypticace enabled auto-merge (squash) August 14, 2025 16:19
@thecrypticace
Copy link
Contributor

We've decided to drop the warning entirely from the browser build for v4. Especially for people who are importing it into their JS through npm.

Though, I still maintain you probably shouldn't use it in production for the same reasons I outlined in #18731.

For now the v3 CDN is unchanged.

@thecrypticace thecrypticace merged commit 48f66dc into tailwindlabs:main Aug 14, 2025
7 checks passed
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

Successfully merging this pull request may close these issues.

3 participants