Skip to content

[v4] CDN jQuery compatibility #15977

Closed
@rozsazoltan

Description

@rozsazoltan

The CDN version also includes the $() function starting from v4.0.0, so it's quite interesting to work with jQuery. Although, for me, this is a bizarre combination, I noticed the issue on StackOverflow: TailwindCSS v4 Play CDN not working with jQuery

Reproduction#01

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
$(document).ready(function () {
  alert("Hello world");
});

Uncaught TypeError: $(...).ready is not a function

Reproduction#02

<script src="https://unpkg.com/@tailwindcss/browser@4"></script>
console.log($)
function $(t,r,o){return P("@property",t,[a("syntax",o?`"${o}"`:'"*"'),a("inherits","false"),...r?[a("initial-value",r)]:[]])}

It doesn't have much of an impact on me, so I haven't tested whether this affects the npm package, but my initial assumption is that it doesn't. I just wanted to mention the incompatibility between the CDN and jQuery.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions