Skip to content

Commit

Permalink
fix: decorate production index.html with bridge script
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaellis authored and juice49 committed Feb 11, 2025
1 parent 04a89e9 commit 161cd7f
Showing 1 changed file with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {type ChunkMetadata, type Plugin} from 'vite'

import {renderDocument} from '../renderDocument'
import {decorateIndexWithBridgeScript, renderDocument} from '../renderDocument'
import {type SanityMonorepo} from '../sanityMonorepo'

interface ViteOutputBundle {
Expand Down Expand Up @@ -86,17 +86,19 @@ export function sanityBuildEntries(options: {
this.emitFile({
type: 'asset',
fileName: 'index.html',
source: await renderDocument({
monorepo,
studioRootPath: cwd,
importMap,
props: {
basePath,
entryPath,
css,
},
isCoreApp,
}),
source: decorateIndexWithBridgeScript(
await renderDocument({
monorepo,
studioRootPath: cwd,
importMap,
props: {
basePath,
entryPath,
css,
},
isCoreApp,
}),
),
})
},
}
Expand Down

0 comments on commit 161cd7f

Please sign in to comment.