Skip to content

Commit 0fa6611

Browse files
authored
fix: trim down accepted args of getPayloadHMR (#7834)
`getPayloadHMR`'s arg type was accepting unnecessary args that did not do anything. This was leading to confusion. This PR trims down the accepted type. Fixes #7832
1 parent a2d68f8 commit 0fa6611

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"build:live-preview": "turbo build --filter live-preview",
2828
"build:live-preview-react": "turbo build --filter live-preview-react",
2929
"build:live-preview-vue": "turbo build --filter live-preview-vue",
30-
"build:next": "turbo build --filter next",
30+
"build:next": "turbo build --filter \"@payloadcms/next\"",
3131
"build:payload": "turbo build --filter payload",
3232
"build:plugin-cloud": "turbo build --filter plugin-cloud",
3333
"build:plugin-cloud-storage": "turbo build --filter plugin-cloud-storage",

packages/next/src/utilities/getPayloadHMR.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ export const reload = async (
6262
}
6363
}
6464

65-
export const getPayloadHMR = async (options: InitOptions): Promise<Payload> => {
65+
export const getPayloadHMR = async (
66+
options: Pick<InitOptions, 'config' | 'importMap'>,
67+
): Promise<Payload> => {
6668
if (!options?.config) {
6769
throw new Error('Error: the payload config is required for getPayloadHMR to work.')
6870
}

0 commit comments

Comments
 (0)