@weaverse/next 0.1.0-alpha.14 → 0.1.0-alpha.15

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.
@@ -118,7 +118,10 @@ export function resolveWeaverseNextStudioScriptSrc(
118
118
  return null
119
119
  }
120
120
 
121
- let bundle = isDesignMode ? 'index.js' : 'preview.js'
121
+ // Builder section-preview URLs carry both isDesignMode and isPreviewMode;
122
+ // the preview iframe waits for `preview-size`, which only preview.js emits,
123
+ // so preview/revision mode takes precedence (matching Hydrogen).
124
+ let bundle = isPreviewMode || isRevisionPreview ? 'preview.js' : 'index.js'
122
125
  let version = last(searchParams, 'weaverseVersion')
123
126
  let url = `${origin}/static/studio/next/${bundle}`
124
127
  return version ? `${url}?v=${encodeURIComponent(version)}` : url