-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] vite build
hangs when building a React app with PostCSS
#8034
Comments
vite
hangs when building a React app with PostCSSvite build
hangs when building a React app with PostCSS
The direct reason here was that esbuild transform was not ending. First, :where(blockquote,:not>cite){border-inline-start-width:var(--border-size-3)} This becomes like below after postcss. The output is not a valid css. :where(blockquote, :not(ltr) {
border-left-width: 3px
}
:where(blockquote, :not(rtl) {
border-right-width: 3px
} Then this css gets processed by esbuild to be minified. But this process never ends. reproduction code (run this with So there's two upstream bugs here.
|
|
This would suggest that [Update]: I run |
I know Also the output of postcss is invalid because the last bracket is missing.
Yes that's true. So it is a bug in esbuild. esbuild fails to handle a css which lacks a closing bracket. |
The solution is not 100% related, but I landed here searching for the same error. We were using a
The fix to the issue was not related to the Vite version or any CSS-related changes. We just returned the EC2 instance to its original size and the build script finished correctly. |
Closing as it was fixed with esbuild 0.14.42. (evanw/esbuild#2276) |
Describe the bug
I'm unable to complete the build process
npm run build
using Vite + PostCSS on my machine as well as online in stackblitz or via Github Actions.Running in
dev
mode works fine and CSS file are processed without any issue. Building it withoutpostcss.config.js
file works without any problem.Attached in Reproduction is a link to a standard react setup referenced in "Trying Vite Online" documentation
Reproduction
https://stackblitz.com/edit/vitejs-vite-zoeewe?file=index.html&terminal=dev
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: