Skip to content

Commit

Permalink
Maybe fix not found queries issue from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed Jun 27, 2023
1 parent 88746ae commit 8926b2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/cli/src/lib/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@shopify/hydrogen-codegen';
import {format, resolveFormatConfig} from './transpile-ts.js';
import {renderFatalError, renderWarning} from '@shopify/cli-kit/node/ui';
import {joinPath, relativePath} from '@shopify/cli-kit/node/path';
import {joinPath} from '@shopify/cli-kit/node/path';
import {AbortError} from '@shopify/cli-kit/node/error';
import {spawn} from 'node:child_process';
import {fileURLToPath} from 'node:url';
Expand Down Expand Up @@ -161,7 +161,6 @@ function generateDefaultConfig(
forceSfapiVersion?: string,
): LoadCodegenConfigResult {
const tsDefaultGlob = '*!(*.d).{ts,tsx}'; // No d.ts files
const appDirRelative = relativePath(rootDirectory, appDirectory);

return {
filepath: 'virtual:codegen',
Expand All @@ -173,8 +172,8 @@ function generateDefaultConfig(
preset,
schema,
documents: [
tsDefaultGlob, // E.g. ./server.ts
joinPath(appDirRelative, '**', tsDefaultGlob), // E.g. app/routes/_index.tsx
joinPath(rootDirectory, tsDefaultGlob), // E.g. ./server.ts
joinPath(appDirectory, '**', tsDefaultGlob), // E.g. app/routes/_index.tsx
],

...(!!forceSfapiVersion && {
Expand Down

0 comments on commit 8926b2e

Please sign in to comment.