From 707e6f6ecfcca526154258a2da472561fdc93fbb Mon Sep 17 00:00:00 2001 From: tbradsha Date: Fri, 24 Jan 2025 21:06:00 +0000 Subject: [PATCH] webpack-config: Set `output.uniqueName` (#41315) * webpack-config: Set `output.uniqueName` When we removed a bunch of otherwise-useless "name" properties from `package.json` files, it turns out that caused Webpack to start using the empty string for its `output.uniqueName`, which may result in collisions if multiple bundles on a page do the same thing. To avoid this, read the "name" from composer.json if package.json lacks one. Also, since we're now setting `output.uniqueName`, various webpack configs using `output.library.name` should also set `output.uniqueName` to maintain the previous behavior. * Remove for entry.x.library.name Hopefully Webpack does the right thing on its own for those. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12957398511 Upstream-Ref: Automattic/jetpack@18b4f1296d497becee156ab8ec6ef4232fc9c818 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65573b9..4b094d9 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@automattic/jetpack-analytics": "^0.1.35", "@automattic/jetpack-api": "^0.17.22", "@automattic/jetpack-base-styles": "^0.6.41", - "@automattic/jetpack-boost-score-api": "^0.1.52", + "@automattic/jetpack-boost-score-api": "^0.1.53-alpha", "@automattic/jetpack-components": "^0.65.4", "@automattic/jetpack-connection": "^0.36.4", "@automattic/jetpack-explat": "^0.2.4",