-
Notifications
You must be signed in to change notification settings - Fork 242
fix: stop base64-encoding dist/index.wasm during function builds #7232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ import {AbortError, AbortSilentError} from '@shopify/cli-kit/node/error' | |||||||||||||||
| import lockfile from 'proper-lockfile' | ||||||||||||||||
| import {dirname, joinPath} from '@shopify/cli-kit/node/path' | ||||||||||||||||
| import {outputDebug} from '@shopify/cli-kit/node/output' | ||||||||||||||||
| import {readFile, touchFile, writeFile, fileExistsSync} from '@shopify/cli-kit/node/fs' | ||||||||||||||||
| import {copyFile, readFile, touchFile, writeFile, fileExistsSync} from '@shopify/cli-kit/node/fs' | ||||||||||||||||
| import {Writable} from 'stream' | ||||||||||||||||
|
|
||||||||||||||||
| export interface ExtensionBuildOptions { | ||||||||||||||||
|
|
@@ -53,6 +53,14 @@ export interface ExtensionBuildOptions { | |||||||||||||||
| * The URL where the app is running. | ||||||||||||||||
| */ | ||||||||||||||||
| appURL?: string | ||||||||||||||||
|
|
||||||||||||||||
| /** | ||||||||||||||||
| * When building for a deploy or dev bundle, this is the output path inside the | ||||||||||||||||
| * bundle directory. When set, build functions write their final artifact here | ||||||||||||||||
| * instead of extension.outputPath. This avoids mutating extension.outputPath at | ||||||||||||||||
| * runtime. | ||||||||||||||||
|
Comment on lines
+59
to
+61
|
||||||||||||||||
| * bundle directory. When set, build functions write their final artifact here | |
| * instead of extension.outputPath. This avoids mutating extension.outputPath at | |
| * runtime. | |
| * bundle directory used for bundled output artifacts. | |
| * | |
| * Some build flows may still write their final artifact to extension.outputPath, | |
| * so this option should not be treated as a universal replacement for that path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In copyIntoBundle, touchFile(bundleOutputPath) assumes the bundle output is a file path. For specs where outputRelativePath is empty (common for contract-based modules), getOutputPathForDirectory returns a directory path; touching it will create a file at that path and can break the subsequent directory copy. Consider removing touchFile here (fs-extra copy creates parent dirs), or switching to ensuring a directory when bundleOutputPath is a directory.