File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,11 @@ async function loadPage(url) {
127127 // Create a temporary div to hold the content
128128 const tempDiv = document . createElement ( 'div' ) ;
129129
130- // Automatically detect and import module scripts
131- await componentLoader . detectAndImportModules ( doc ) ;
130+ // Extract module script sources (they'll be loaded later by the router)
131+ const moduleScripts = componentLoader . extractModuleScriptSources ( doc ) ;
132+ console . log ( 'Extracted module scripts:' , moduleScripts ) ;
132133
133- // Filter out script tags (they'll be imported dynamically)
134+ // Filter out script tags (they'll be imported dynamically by the router )
134135 const contentWithoutScripts = componentLoader . filterScriptTags ( doc . body , true ) ; // Keep script tags
135136 content = contentWithoutScripts . innerHTML ;
136137 }
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ async function loadPage(url) {
4040 const parser = new DOMParser ( ) ;
4141 const doc = parser . parseFromString ( html , 'text/html' ) ;
4242
43- // Import any modules
44- await componentLoader . detectAndImportModules ( doc ) ;
43+ // Extract module script sources (they'll be loaded later by the router)
44+ const moduleScripts = componentLoader . extractModuleScriptSources ( doc ) ;
45+ console . log ( 'Extracted module scripts in router.js:' , moduleScripts ) ;
4546
4647 // Execute any inline scripts
4748 await componentLoader . executeInlineScripts ( doc ) ;
You can’t perform that action at this time.
0 commit comments