@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.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types/studio-script-src.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/studio-script-src.ts +4 -1
package/src/studio-script-src.ts
CHANGED
|
@@ -118,7 +118,10 @@ export function resolveWeaverseNextStudioScriptSrc(
|
|
|
118
118
|
return null
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
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
|