From 2a4d30101222fe4a2462318e59eda84f9c054deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Zi=C3=B3=C5=82kowski?= Date: Wed, 13 Nov 2024 17:28:31 +0100 Subject: [PATCH 1/2] WP Scripts: Revert changes that inline CSS imports early in the build process --- package-lock.json | 32 +---------------------- package.json | 1 - packages/scripts/CHANGELOG.md | 1 + packages/scripts/config/webpack.config.js | 1 - packages/scripts/package.json | 1 - 5 files changed, 2 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f8f627dca805..0eb2d6ce05822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -119,7 +119,6 @@ "npm-run-all": "4.1.5", "patch-package": "8.0.0", "postcss": "8.4.38", - "postcss-import": "16.1.0", "postcss-loader": "6.2.1", "postcss-local-keyframes": "^0.0.2", "prettier": "npm:wp-prettier@3.0.3", @@ -40557,6 +40556,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -40836,27 +40836,6 @@ "postcss": "^8.2.15" } }, - "node_modules/postcss-import": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-16.1.0.tgz", - "integrity": "sha512-7hsAZ4xGXl4MW+OKEWCnF6T5jqBw80/EE9aXg1r2yyn1RsVEU8EtKXbijEODa+rg7iih4bKf7vlvTGYR4CnPNg==", - "dependencies": { - "postcss-value-parser": "^4.0.0", - "read-cache": "^1.0.0", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "postcss": "^8.0.0" - } - }, - "node_modules/postcss-import/node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" - }, "node_modules/postcss-loader": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz", @@ -43337,14 +43316,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-cache": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", - "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", - "dependencies": { - "pify": "^2.3.0" - } - }, "node_modules/read-cmd-shim": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz", @@ -55585,7 +55556,6 @@ "npm-package-json-lint": "^6.4.0", "npm-packlist": "^3.0.0", "postcss": "^8.4.5", - "postcss-import": "^16.1.0", "postcss-loader": "^6.2.1", "prettier": "npm:wp-prettier@3.0.3", "puppeteer-core": "^23.1.0", diff --git a/package.json b/package.json index 87cf9a5cacd94..f987643e73756 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,6 @@ "npm-run-all": "4.1.5", "patch-package": "8.0.0", "postcss": "8.4.38", - "postcss-import": "16.1.0", "postcss-loader": "6.2.1", "postcss-local-keyframes": "^0.0.2", "prettier": "npm:wp-prettier@3.0.3", diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index 452028cab49cd..54ea38648d21a 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -7,6 +7,7 @@ ### Bug Fix - Make `start` script more resilient for developer errors ([#66752](https://github.com/WordPress/gutenberg/pull/66752)). +- Revert changes from [#61121](https://github.com/WordPress/gutenberg/pull/61121) that inlined CSS files imported from other CSS files before optimization in the `build` command. ## 30.4.0 (2024-10-30) diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js index 91ef19fc27ed6..f9ef7dc5b7acc 100644 --- a/packages/scripts/config/webpack.config.js +++ b/packages/scripts/config/webpack.config.js @@ -75,7 +75,6 @@ const cssLoaders = [ plugins: isProduction ? [ ...postcssPlugins, - require( 'postcss-import' ), require( 'cssnano' )( { // Provide a fallback configuration if there's not // one explicitly available in the project. diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 34629bf9843ff..5545e136939bf 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -74,7 +74,6 @@ "npm-package-json-lint": "^6.4.0", "npm-packlist": "^3.0.0", "postcss": "^8.4.5", - "postcss-import": "^16.1.0", "postcss-loader": "^6.2.1", "prettier": "npm:wp-prettier@3.0.3", "puppeteer-core": "^23.1.0", From faba9a7b0032e9011cf4591696454ad91f3c3d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Zi=C3=B3=C5=82kowski?= Date: Mon, 18 Nov 2024 10:05:14 +0100 Subject: [PATCH 2/2] Fix changelog entry --- packages/scripts/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index 54ea38648d21a..ab927f62f0889 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,12 +2,15 @@ ## Unreleased +### Bug Fix + +- Revert changes from [#61121](https://github.com/WordPress/gutenberg/pull/61121) that inlined CSS files imported from other CSS files before optimization in the `build` command. + ## 30.5.0 (2024-11-16) ### Bug Fix - Make `start` script more resilient for developer errors ([#66752](https://github.com/WordPress/gutenberg/pull/66752)). -- Revert changes from [#61121](https://github.com/WordPress/gutenberg/pull/61121) that inlined CSS files imported from other CSS files before optimization in the `build` command. ## 30.4.0 (2024-10-30)