From 0e410839fb39c4124e6a6145ffbdcd0900166609 Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:09:25 +0100 Subject: [PATCH 1/4] fix emotion template literal minification --- dotcom-rendering/package.json | 3 ++- dotcom-rendering/webpack/.swcrc.json | 3 +++ pnpm-lock.yaml | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dotcom-rendering/package.json b/dotcom-rendering/package.json index 2b68ad20229..fa63d591027 100644 --- a/dotcom-rendering/package.json +++ b/dotcom-rendering/package.json @@ -32,8 +32,8 @@ "@guardian/bridget": "8.13.1", "@guardian/browserslist-config": "6.1.0", "@guardian/cdk": "catalog:", - "@guardian/consent-manager": "1.0.0", "@guardian/commercial-core": "34.0.0", + "@guardian/consent-manager": "1.0.0", "@guardian/core-web-vitals": "7.0.0", "@guardian/eslint-config": "catalog:", "@guardian/identity-auth": "6.0.1", @@ -56,6 +56,7 @@ "@swc/cli": "0.8.1", "@swc/core": "1.15.41", "@swc/jest": "0.2.39", + "@swc/plugin-emotion": "^14.12.0", "@testing-library/dom": "10.4.1", "@testing-library/jest-dom": "6.9.1", "@testing-library/react": "16.3.0", diff --git a/dotcom-rendering/webpack/.swcrc.json b/dotcom-rendering/webpack/.swcrc.json index 51f3d35ea92..490d70a5893 100644 --- a/dotcom-rendering/webpack/.swcrc.json +++ b/dotcom-rendering/webpack/.swcrc.json @@ -12,6 +12,9 @@ "runtime": "automatic", "importSource": "@emotion/react" } + }, + "experimental": { + "plugins": [["@swc/plugin-emotion", {}]] } }, "sourceMaps": true diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 496c562923a..3208079f43c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -398,6 +398,9 @@ importers: '@swc/jest': specifier: 0.2.39 version: 0.2.39(@swc/core@1.15.41) + '@swc/plugin-emotion': + specifier: ^14.12.0 + version: 14.12.0 '@testing-library/dom': specifier: 10.4.1 version: 10.4.1 @@ -3945,6 +3948,9 @@ packages: peerDependencies: '@swc/core': '*' + '@swc/plugin-emotion@14.12.0': + resolution: {integrity: sha512-lyAQgTeDkowq/4+8JYaviVOL4jXSdObz+uuk84DjM0z4qoiMpI6xoDVp7/tjWeVjmLc2U6Qp3hDuwWMZ5xe88Q==} + '@swc/types@0.1.26': resolution: {integrity: sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==} @@ -13524,6 +13530,10 @@ snapshots: '@swc/counter': 0.1.3 jsonc-parser: 3.2.0 + '@swc/plugin-emotion@14.12.0': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types@0.1.26': dependencies: '@swc/counter': 0.1.3 From fc6421ec2ca36f5165f0c67204b7e4dcb6d9f472 Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:58:49 +0100 Subject: [PATCH 2/4] pin dep --- dotcom-rendering/package.json | 2 +- pnpm-lock.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dotcom-rendering/package.json b/dotcom-rendering/package.json index fa63d591027..e0322b96e7a 100644 --- a/dotcom-rendering/package.json +++ b/dotcom-rendering/package.json @@ -56,7 +56,7 @@ "@swc/cli": "0.8.1", "@swc/core": "1.15.41", "@swc/jest": "0.2.39", - "@swc/plugin-emotion": "^14.12.0", + "@swc/plugin-emotion": "14.12.0", "@testing-library/dom": "10.4.1", "@testing-library/jest-dom": "6.9.1", "@testing-library/react": "16.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3208079f43c..d693d46643b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -399,7 +399,7 @@ importers: specifier: 0.2.39 version: 0.2.39(@swc/core@1.15.41) '@swc/plugin-emotion': - specifier: ^14.12.0 + specifier: 14.12.0 version: 14.12.0 '@testing-library/dom': specifier: 10.4.1 From 04113fe032472bdf7049fe3b6027e7e05f5d4b61 Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Wed, 17 Jun 2026 10:59:21 +0100 Subject: [PATCH 3/4] ignore .swc --- dotcom-rendering/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotcom-rendering/.gitignore b/dotcom-rendering/.gitignore index 0975586c5f1..8211ed94307 100644 --- a/dotcom-rendering/.gitignore +++ b/dotcom-rendering/.gitignore @@ -4,3 +4,6 @@ tsconfig.tsbuildinfo # CDK asset staging directory .cdk.staging cdk.out + +# SWC cache +.swc From 12eb9297d540c4d558f42bd4eee0d0e264da57cf Mon Sep 17 00:00:00 2001 From: Jake Lee Kennedy <1731150+Jakeii@users.noreply.github.com> Date: Thu, 18 Jun 2026 09:26:57 +0100 Subject: [PATCH 4/4] fix live block container --- dotcom-rendering/src/components/LiveBlockContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotcom-rendering/src/components/LiveBlockContainer.tsx b/dotcom-rendering/src/components/LiveBlockContainer.tsx index 4a47fb3de6e..ed969fafba3 100644 --- a/dotcom-rendering/src/components/LiveBlockContainer.tsx +++ b/dotcom-rendering/src/components/LiveBlockContainer.tsx @@ -110,7 +110,7 @@ const BlockByline = ({ ); }; -const liveBlockContainerStyles = () => css` +const liveBlockContainerStyles = css` padding: ${space[2]}px ${SIDE_MARGIN_MOBILE}px; box-sizing: border-box; margin-bottom: ${space[3]}px;