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
+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;