diff --git a/dotcom-rendering/package.json b/dotcom-rendering/package.json index 36bbc57f630..eeaacddb08a 100644 --- a/dotcom-rendering/package.json +++ b/dotcom-rendering/package.json @@ -104,7 +104,6 @@ "compression": "1.8.2", "constructs": "catalog:", "cpy": "11.0.0", - "css-loader": "7.1.5", "dompurify": "3.4.13", "dynamic-import-polyfill": "0.1.1", "eslint": "catalog:", @@ -149,7 +148,6 @@ "stylelint-config-recommended": "14.0.0", "swc-loader": "0.2.7", "swr": "1.3.0", - "to-string-loader": "1.2.0", "trusted-types": "2.0.0", "ts-unused-exports": "10.1.0", "tslib": "catalog:", diff --git a/dotcom-rendering/webpack/webpack.config.client.js b/dotcom-rendering/webpack/webpack.config.client.js index 056f5697e01..e9739633611 100644 --- a/dotcom-rendering/webpack/webpack.config.client.js +++ b/dotcom-rendering/webpack/webpack.config.client.js @@ -66,6 +66,9 @@ const getLoaders = (build) => { * @returns {import('webpack').Configuration} */ module.exports = ({ build }) => ({ + experiments: { + css: true, + }, entry: { index: getEntryIndex(build), debug: './src/client/debug/debug.ts', @@ -136,7 +139,10 @@ module.exports = ({ build }) => ({ }, { test: /\.css$/, - use: ['to-string-loader', 'css-loader'], + type: 'css/auto', + parser: { + exportType: 'text', + }, }, svgr, ], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cecbfca4f24..e6088041f22 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -700,9 +700,6 @@ importers: cpy: specifier: 11.0.0 version: 11.0.0 - css-loader: - specifier: 7.1.5 - version: 7.1.5(webpack@5.111.1) dompurify: specifier: 3.4.13 version: 3.4.13 @@ -835,9 +832,6 @@ importers: swr: specifier: 1.3.0 version: 1.3.0(react@18.3.1) - to-string-loader: - specifier: 1.2.0 - version: 1.2.0 trusted-types: specifier: 2.0.0 version: 2.0.0 @@ -5503,9 +5497,6 @@ packages: bidi-js@1.1.0: resolution: {integrity: sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg==} - big.js@5.2.2: - resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} - binary-version-check@6.1.0: resolution: {integrity: sha512-REKdLKmuViV2WrtWXvNSiPX04KbIjfUV3Cy8batUeOg+FtmowavzJorfFhWq95cVJzINnL/44ixP26TrdJZACA==} engines: {node: '>=18'} @@ -6230,10 +6221,6 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - emojis-list@3.0.0: - resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} - engines: {node: '>= 4'} - encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -7703,10 +7690,6 @@ packages: engines: {node: '>=22.22.1'} hasBin: true - loader-utils@1.4.2: - resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} - engines: {node: '>=4.0.0'} - locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} @@ -9364,9 +9347,6 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - to-string-loader@1.2.0: - resolution: {integrity: sha512-KsWUL8FccgBW9FPFm4vYoQbOOcO5m6hKOGYoXjbseD9/4Ft+ravXN5jolQ9kTKYcK4zPt1j+khx97GPGnVoi6A==} - toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -15398,8 +15378,6 @@ snapshots: dependencies: require-from-string: 2.0.2 - big.js@5.2.2: {} - binary-version-check@6.1.0: dependencies: binary-version: 7.1.0 @@ -16095,8 +16073,6 @@ snapshots: emoji-regex@9.2.2: {} - emojis-list@3.0.0: {} - encodeurl@2.0.0: {} endent@2.1.0: @@ -18085,12 +18061,6 @@ snapshots: optionalDependencies: yaml: 2.9.1 - loader-utils@1.4.2: - dependencies: - big.js: 5.2.2 - emojis-list: 3.0.0 - json5: 1.0.2 - locate-character@3.0.0: {} locate-path@5.0.0: @@ -20028,10 +19998,6 @@ snapshots: dependencies: is-number: 7.0.0 - to-string-loader@1.2.0: - dependencies: - loader-utils: 1.4.2 - toidentifier@1.0.1: {} token-types@6.1.2: