Fix Hydrogen webpack build and editor link keys

This commit is contained in:
Rami Bitar
2026-08-29 21:31:32 -04:00
parent 69ca137c7d
commit b2d2f65071
2 changed files with 11 additions and 3 deletions
+2 -2
View File
@@ -54,9 +54,9 @@ const Footer: React.FC<FooterProps> = ({
/>
<nav className="flex flex-wrap items-center justify-center gap-x-5 gap-y-2 sm:justify-start">
{links.map((link) => (
{links.map((link, index) => (
<a
key={link.label}
key={`${link.url}-${index}`}
href={link.url}
className="text-sm text-muted-foreground hover:text-foreground transition-colors"
>
+9 -1
View File
@@ -27,8 +27,16 @@ export default {
experimental: {
reactDebugChannel: false,
},
webpack: (config, { isServer }) => {
webpack: (config, { isServer, webpack }) => {
config.cache = { type: 'memory' };
// Hydrogen's root entry imports this browser-only analytics module by URL.
// Webpack resolves it before tree-shaking and otherwise rejects the https: scheme.
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp:
/^https:\/\/cdn\.shopify\.com\/storefront\/standard-events\.js$/,
})
);
if (isServer) {
config.optimization = config.optimization || {};
config.optimization.splitChunks = false;