Skip to content

Dev server returns 500 "Internal server error: Unexpected semicolon" if there is an additional semicolon in a module.css file #18523

@ChenPeleg

Description

@ChenPeleg

What version of Tailwind CSS are you using?

4.1.11

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

For example: postcss-cli 11.0.0, Next.js 15.1.7, Vite 6.1.0

What version of Node.js are you using?

"vite": "^7.0.0",

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction URL

A Tailwind Play link or public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways.

A reproduction is required when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves.

Describe your issue

Description

Dev server returns 500 "Internal server error: Unexpected semicolon" if there is an additional semicolon in a module.css file

How to reproduce (only the bare minimum)

"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"devDependencies": {
"@tailwindcss/vite": "^4.1.11",
"@vitejs/plugin-react": "^4.5.2",
"tailwindcss": "^4.1.11",
"vite": "^7.0.0",
}

// Component.tsx
import styles from "./Component.module.css"

// Component.module.css
.abc {
color: black;;
}
This happens if there are two consecutive semicolons

Current behavior

Dev server returns 500 "Internal server error: Unexpected semicolon"

Expected behavior

Throw something else

Metadata

Metadata

Assignees

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