diff --git a/packages/app/src/cli/services/dev/update-extension.test.ts b/packages/app/src/cli/services/dev/update-extension.test.ts index 8bc3971ebb..567530801b 100644 --- a/packages/app/src/cli/services/dev/update-extension.test.ts +++ b/packages/app/src/cli/services/dev/update-extension.test.ts @@ -13,7 +13,7 @@ import {ExtensionUpdateDraftMutationVariables} from '../../api/graphql/partners/ import {inTemporaryDirectory, mkdir, writeFile} from '@shopify/cli-kit/node/fs' import {outputInfo} from '@shopify/cli-kit/node/output' import {describe, expect, vi, test} from 'vitest' -import {joinPath} from '@shopify/cli-kit/node/path' +import {dirname, joinPath} from '@shopify/cli-kit/node/path' import {platformAndArch} from '@shopify/cli-kit/node/os' import {randomUUID} from '@shopify/cli-kit/node/crypto' @@ -206,7 +206,9 @@ describe('updateExtensionDraft()', () => { const content = 'test content' const base64Content = Buffer.from(content).toString('base64') await mkdir(joinPath(mockExtension.directory, 'dist')) - await writeFile(joinPath(mockExtension.directory, 'dist', filepath), content) + const outputPath = mockExtension.getOutputPathForDirectory(tmpDir) + await mkdir(dirname(outputPath)) + await writeFile(outputPath, content) await updateExtensionDraft({ extension: mockExtension, diff --git a/packages/app/src/cli/services/dev/update-extension.ts b/packages/app/src/cli/services/dev/update-extension.ts index 7a799bfe2e..e20d189312 100644 --- a/packages/app/src/cli/services/dev/update-extension.ts +++ b/packages/app/src/cli/services/dev/update-extension.ts @@ -39,9 +39,7 @@ export async function updateExtensionDraft({ }: UpdateExtensionDraftOptions) { let encodedFile: string | undefined const outputPath = extension.getOutputPathForDirectory(bundlePath) - if (extension.features.includes('esbuild')) { - const outputPath = extension.getOutputPathForDirectory(bundlePath) const content = await readFile(outputPath) if (!content) return encodedFile = Buffer.from(content).toString('base64')