-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
CSS in HTML (inline) fails to build #15527
Comments
Your minimum reproduction doesn't seem to error. https://stackblitz.com/github/movahhedi/vite-bug-inline-css?file=package.json |
I think this is a Windows bug where we're not properly handling backslashes in vite/packages/vite/src/node/plugins/html.ts Line 459 in b44c493
vite/packages/vite/src/node/plugins/html.ts Line 584 in b44c493
vite/packages/vite/src/node/plugins/html.ts Line 603 in b44c493
I'm a bit surprised we only got this bug report today. As a fix, we could probably call vite/packages/vite/src/node/plugins/html.ts Lines 99 to 107 in b44c493
|
I was also having the error and can confirm the linked PR fixed it. |
Describe the bug
Hello there.
I'm trying to put CSS inline in HTML. But upon build, I get this:
I've created a minimal reproduction here.
index.html
Putting the
<style>
in<head>
doesn't make any difference.vite.config.ts
tsconfig.json
Reproduction
https://github.com/movahhedi/vite-bug-inline-css
Steps to reproduce
In the reproduction repo, (using Yarn Berry v4.0.2), after
yarn install
, runyarn build
.System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: