@sanity/client 6.27.2-resources.0 → 6.27.2-resources.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -230,7 +230,15 @@ const initConfig = (config, prevConfig) => {
230
230
  const newConfig = {
231
231
  ...defaultConfig,
232
232
  ...specifiedConfig
233
- }, experimentalResource = newConfig.experimental_resource;
233
+ };
234
+ if (newConfig.projectId?.startsWith("resource.")) {
235
+ const [, resourceType, resourceId] = newConfig.projectId?.split(".");
236
+ resourceType && resourceId && (newConfig.experimental_resource = {
237
+ type: resourceType,
238
+ id: resourceId
239
+ });
240
+ }
241
+ const experimentalResource = newConfig.experimental_resource;
234
242
  experimentalResource && (newConfig.useProjectHostname = !1);
235
243
  const projectBased = newConfig.useProjectHostname;
236
244
  if (typeof Promise > "u") {