diff --git a/packages/theme/src/cli/utilities/asset-ignore.ts b/packages/theme/src/cli/utilities/asset-ignore.ts index 45c9b425a1..37e42c5dff 100644 --- a/packages/theme/src/cli/utilities/asset-ignore.ts +++ b/packages/theme/src/cli/utilities/asset-ignore.ts @@ -64,7 +64,7 @@ function matchGlob(key: string, pattern: string) { if (result) return true // When the the standard match fails and the pattern includes '/*.', we - // replace '/*' with '/**/*' to emulate Shopify CLI 2.x behavior, as it was + // replace '/*.' with '/**/*.' to emulate Shopify CLI 2.x behavior, as it was // based on 'File.fnmatch'. if (shouldReplaceGlobPattern(pattern)) { return originalMatchGlob(key, pattern.replace(templatesRegex, 'templates/**/*$1'), matchOpts) @@ -79,8 +79,8 @@ export function raiseWarningForNonExplicitGlobPatterns(patterns: string[]) { if (shouldReplaceGlobPattern(pattern)) { outputWarn( `Warning: The pattern '${pattern}' does not include subdirectories. To maintain backwards compatibility, we have modified your pattern to ${pattern.replace( - '/*', - '/**/*', + templatesRegex, + 'templates/**/*$1', )} to explicitly include subdirectories.`, ) }