From 5c7a97c6101c99f18290b9264e82281710cccfb0 Mon Sep 17 00:00:00 2001 From: bonkalol Date: Sat, 7 Dec 2024 13:18:10 +0300 Subject: [PATCH 1/4] Fixed an issue with FAT_HTML build --- .../super/i-static-page/i-static-page.html.ss | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/super/i-static-page/i-static-page.html.ss b/src/components/super/i-static-page/i-static-page.html.ss index 6b16e54636..ee55123f19 100644 --- a/src/components/super/i-static-page/i-static-page.html.ss +++ b/src/components/super/i-static-page/i-static-page.html.ss @@ -141,13 +141,23 @@ - block headScripts += await h.loadLibs(deps.headScripts, {assets, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) - += h.getScriptDeclByName('std', {assets, optional: true, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) + + += h.getScriptDeclByName('std', {assets, optional: true, wrap: true, js: inlineDepsDeclarations}) + += await h.loadLibs(deps.scripts, {assets, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) - += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) - += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) + - if !inlineDepsDeclarations + < script #scripts + += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: false, js: false}) + += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: false, js: false}) + + += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: false, js: false}) + + - else + += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: true, js: true}) + += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: true, js: true}) - += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: inlineDepsDeclarations, js: inlineDepsDeclarations}) + += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: true, js: true}) < body ${rootAttrs|!html} Date: Wed, 25 Dec 2024 17:49:09 +0300 Subject: [PATCH 2/4] :wrench: --- .../super/i-static-page/i-static-page.html.ss | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/super/i-static-page/i-static-page.html.ss b/src/components/super/i-static-page/i-static-page.html.ss index 6b16e54636..0235b30d45 100644 --- a/src/components/super/i-static-page/i-static-page.html.ss +++ b/src/components/super/i-static-page/i-static-page.html.ss @@ -15,6 +15,7 @@ : canInlineSourceCode = !config.webpack.externalizeInline() : inlineDepsDeclarations = Boolean(config.webpack.dynamicPublicPath()) +: isFatHtml = config.webpack.fatHTML() === 1 : themeAttribute = config.theme.attribute : theme = config.theme.postProcessor ? config.theme.postProcessorTemplate : config.theme.default() @@ -140,14 +141,26 @@ Date: Thu, 26 Dec 2024 12:44:13 +0300 Subject: [PATCH 3/4] Do not load all scripts into single script block --- .../super/i-static-page/i-static-page.html.ss | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/components/super/i-static-page/i-static-page.html.ss b/src/components/super/i-static-page/i-static-page.html.ss index 0235b30d45..064f01c702 100644 --- a/src/components/super/i-static-page/i-static-page.html.ss +++ b/src/components/super/i-static-page/i-static-page.html.ss @@ -16,6 +16,7 @@ : canInlineSourceCode = !config.webpack.externalizeInline() : inlineDepsDeclarations = Boolean(config.webpack.dynamicPublicPath()) : isFatHtml = config.webpack.fatHTML() === 1 +: wrapScripts = inlineDepsDeclarations || isFatHtml : themeAttribute = config.theme.attribute : theme = config.theme.postProcessor ? config.theme.postProcessorTemplate : config.theme.default() @@ -141,26 +142,14 @@ Date: Fri, 27 Dec 2024 12:30:29 +0300 Subject: [PATCH 4/4] one more try --- .../super/i-static-page/i-static-page.html.ss | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/super/i-static-page/i-static-page.html.ss b/src/components/super/i-static-page/i-static-page.html.ss index 064f01c702..3248a877dd 100644 --- a/src/components/super/i-static-page/i-static-page.html.ss +++ b/src/components/super/i-static-page/i-static-page.html.ss @@ -146,10 +146,16 @@ += h.getScriptDeclByName('std', {assets, optional: true, wrap: wrapScripts, js: inlineDepsDeclarations}) += await h.loadLibs(deps.scripts, {assets, wrap: wrapScripts, js: inlineDepsDeclarations}) - += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: wrapScripts, js: inlineDepsDeclarations}) - += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: wrapScripts, js: inlineDepsDeclarations}) + - if wrapScripts + < script + += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: false, js: true}) + += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: false, js: true}) + += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: false, js: true}) - += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: wrapScripts, js: inlineDepsDeclarations}) + - else + += h.getScriptDeclByName('vendor', {assets, optional: true, wrap: true, js: true}) + += h.getScriptDeclByName('index-core', {assets, optional: true, wrap: true, js: true}) + += h.getPageScriptDepsDecl(ownDeps, {assets, wrap: true, js: true}) < body ${rootAttrs|!html}