Skip to content

Bug: [url] in typescript comments causing Unclosed block errors #17128

@mhornbacher

Description

@mhornbacher

What version of Tailwind CSS are you using?

@tailwindcss/postcss v4.0.10+

What build tool (or framework if it abstracts the build tool) are you using?

Next.js 15.2.2

What version of Node.js are you using?

v22.14.0

What browser are you using?

N/A

What operating system are you using?

macOS

Reproduction URL

https://github.com/mhornbacher/tailwind-repro

Details
Since version 4.0.10, /**/ style comments in .ts files containing [url] syntax generate the following build error:

HookWebpackError: /Users/menachem/dev/bugs/tailwind-repro/static/css/299a46ed717ed6dc.css:46:4146: Unclosed block

For instance, adding a file like this anywhere in the source code triggers a crash that is challenging to debug:

// junk.ts
/* 
  add a url here [https://github.com/arasatasaygin/is.js]
*/
export function junk() {
  return 1 + 1;
}

To identify this issue, it is recommended to utilize the @tailwindcss/cli to generate an output and subsequently search it for the URL.

The commit that appears most relevant to this issue is: b3c2556

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions