Skip to content

Commit 86f6628

Browse files
GatsbyJS Botvladar
GatsbyJS Bot
andauthored
fix(gatsby): do not add global id to style tag (#31813) (#31827)
(cherry picked from commit 132d829) Co-authored-by: Vladimir Razuvaev <[email protected]>
1 parent 5f66cb1 commit 86f6628

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

integration-tests/ssr/test-output.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// There are many script tag differences
2323
$(`script`).remove()
2424
// Only added in production
25-
$(`#gatsby-global-css`).remove()
25+
$(`style[data-identity="gatsby-global-css"]`).remove()
2626
// Only added in development
2727
$(`link[data-identity='gatsby-dev-css']`).remove()
2828
// Only in prod

packages/gatsby/cache-dir/static-entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export default ({
347347
headComponents.unshift(
348348
<style
349349
data-href={`${__PATH_PREFIX__}/${style.name}`}
350-
id={`gatsby-global-css`}
350+
data-identity={`gatsby-global-css`}
351351
dangerouslySetInnerHTML={{
352352
__html: style.content,
353353
}}

0 commit comments

Comments
 (0)