Skip to content

Commit 8327208

Browse files
committed
Fix to run enable Bridget on local Android emulator
1 parent 07fea84 commit 8327208

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dotcom-rendering/src/lib/assets.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ export const EDITIONS_CROSSWORD_SCRIPT = getScriptRegex(
123123

124124
export const generateScriptTags = (scripts: string[]): string[] =>
125125
scripts.filter(isString).map((script) => {
126+
// Fix to run enable Bridget on local Android emulator
127+
if (isDev ?? script.match(APPS_SCRIPT)) {
128+
return [
129+
`<script type="module" src="${script}"></script>`,
130+
`<script type="module" src="${script.replace(
131+
'localhost',
132+
'10.0.2.2',
133+
)}"></script>`,
134+
].join('\n');
135+
}
136+
126137
if (
127138
script.match(WEB) ??
128139
script.match(WEB_VARIANT_SCRIPT) ??

0 commit comments

Comments
 (0)