-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What version of Tailwind CSS are you using?
3.4.2
What build tool (or framework if it abstracts the build tool) are you using?
PostCSS 8.4.35 Vite 5.1.5
What version of Node.js are you using?
v21.6.2
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
Sorry I don't have reproduction as the repo is my company private repo.
Describe your issue
f2a7c2c#diff-e52d7cbb53c2deb88bfe15cfc210a387853cf9f243172b6e2844bb88bc9743a3R115
In this change, a regex replace was added to manipulate the file path.
After some research, I found this regex will try to add backslash to parentheses.
// Escape special characters in the file path such as: ()[]
// But only if the special character isn't already escaped
console.log("filePath before", filePath);
filePath = filePath.replace(/(?<!\\)([\[\]\(\)])/g, "\\$1");
console.log("filePath after", filePath);
# console log below
filePath before /Users/user/Desktop/project/apps/web/src/**/*!(*.stories|*.spec).tsx
filePath after /Users/user/Desktop/project/apps/web/src/**/*!\(*.stories|*.spec\).tsx
However this line breaks my entire project, I am getting this error:

By commenting this line, I don't get any warning anymore and my styles can be processed now.

