Skip to content
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

fix(css): inline css correctly for double quote use strict #19590

Conversation

sapphi-red
Copy link
Member

Description

The original code assumed that use strict is written with single quotes. This is true for common cases as rollup outputs use strict with single quotes. But plugins before vite:css-post plugin might change them to double quotes, and in those cases, this code did not work.

Ported from vitejs#79 (rolldown outputs use strict with double quotes so without this change it doesn't work; ported now as this would also fix issues not related to rolldown)

@sapphi-red sapphi-red added feat: css p2-edge-case Bug, but has workaround or limited in scope (priority) labels Mar 6, 2025
@sapphi-red sapphi-red force-pushed the fix/css-inline-css-correctly-for-single-quote-use-strict branch from 4f0dd12 to 95f6d31 Compare March 6, 2025 08:44
patak-dev
patak-dev previously approved these changes Mar 6, 2025
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch bjorn! 😄

@sapphi-red sapphi-red merged commit d0aa833 into vitejs:main Mar 7, 2025
23 of 24 checks passed
@sapphi-red sapphi-red deleted the fix/css-inline-css-correctly-for-single-quote-use-strict branch March 7, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants