diff --git a/code/builders/builder-vite/src/codegen-modern-iframe-script.ts b/code/builders/builder-vite/src/codegen-modern-iframe-script.ts index 7ad50afec12f..4abf4c22f315 100644 --- a/code/builders/builder-vite/src/codegen-modern-iframe-script.ts +++ b/code/builders/builder-vite/src/codegen-modern-iframe-script.ts @@ -27,7 +27,7 @@ export async function generateModernIframeScriptCode(options: Options, projectRo .map( (previewAnnotation, index) => // Prefer the updated module from an HMR update, otherwise import the original module - `hmrPreviewAnnotationModules.at(${index}) ?? import('${previewAnnotation}')` + `hmrPreviewAnnotationModules[${index}] ?? import('${previewAnnotation}')` ) .join(',\n')}]) return composeConfigs(configs);