@flatjs/evolve 1.8.1-next.107 → 1.8.1-next.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @flatjs/evolve
2
2
 
3
+ ## 1.8.1-next.109
4
+
5
+ ### Patch Changes
6
+
7
+ - a5e6989: formating templates
8
+ - 9760f0a: Make `react-fast-refresh` works correct on iframe and no `devtool` environment
9
+
10
+ ## 1.8.1-next.108
11
+
12
+ ### Patch Changes
13
+
14
+ - 75e16ab: change `circle-dependency` error to waring as default
15
+ - 7941f1e: bump version
16
+ - Updated dependencies [891a384]
17
+ - Updated dependencies [7941f1e]
18
+ - @flatjs/evolve-preset-babel@1.8.1-next.24
19
+ - @flatjs/forge-postcss-plugin-pixel@1.8.1-next.39
20
+ - @flatjs/common@1.8.1-next.39
21
+ - @flatjs/graph@1.8.1-next.58
22
+ - @flatjs/mock@1.8.1-next.82
23
+
3
24
  ## 1.8.1-next.107
4
25
 
5
26
  ### Patch Changes
@@ -13,3 +13,12 @@ export declare const viewportScripts = "(function(d){var j;var b=1;var i=1;var h
13
13
  * https://polyfill.io
14
14
  */
15
15
  export declare const polyfill: string[];
16
+ /**
17
+ * Applies the react-refresh Babel plugin on non-production modes only
18
+ * Ensure `react-refresh/runtime` is hoisted and shared
19
+ * https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#externalising-react
20
+ */
21
+ export declare const devReactFastRefresh: {
22
+ runtime: string;
23
+ reactRefreshSetup: string;
24
+ };
package/dist/constants.js CHANGED
@@ -1 +1 @@
1
- export const moduleName="@flatjs/evolve";export const configFileName="flatjs-evolve";export const viewportScripts='(function(d){var j;var b=1;var i=1;var h=750;var c=100;function e(s,o){var q=d.document;var l=q.documentElement;var k=navigator.userAgent;var m=k.toLowerCase().indexOf("android")>-1;i=d.devicePixelRatio||1;if(i>3){i=3}if(m){i=1}console.log("current devicePixelRatio:",i);l.setAttribute("data-dpr",i.toString());var p=q.querySelector(\'meta[name="viewport"]\');if(!p){b=1/i;p=q.createElement("meta");p.setAttribute("name","viewport");q.head.appendChild(p);p.setAttribute(["content","width=device-width,user-scalable=no,initial-scale=",b,",maximum-scale=",b,",minimum-scale=",b].join(""))}function n(){var t=document.documentElement.clientWidth;j=t/o*(s/i)*i;q.documentElement.style.fontSize=String(j)+"px"}var r;d.addEventListener("resize",function(){clearTimeout(r);r=setTimeout(n,300)},false);d.addEventListener("onload",n,false);n()}e(c,h);window.fabricViewport={currRem:j,currDpr:i,currScale:b,dpiPX2px:function f(k){return parseFloat(k.toString())/j*100+"px"},px2DPIpx:function a(k){return parseFloat(k.toString())/100*j+"px"},px2rem:function g(k){return parseFloat(k.toString())/100+"rem"}}})(window);';export const polyfill=["https://polyfill.io/v3/polyfill.min.js?features=Array.from%2CArray.isArray%2CArray.of%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.forEach%2CArray.prototype.flatMap%2CArray.prototype.keys%2CArray.prototype.indexOf%2CArray.prototype.includes%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CBlob%2CDataView%2CDate.now%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.freeze%2CObject.fromEntries%2CObject.getOwnPropertySymbols%2CObject.getOwnPropertyNames%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyDescriptor%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.isFrozen%2CObject.isSealed%2CObject.keys%2CObject.values%2CObject.setPrototypeOf%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.apply%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.getPrototypeOf%2CReflect.getOwnPropertyDescriptor%2CReflect.get%2CReflect.ownKeys%2CReflect.isExtensible%2CReflect.has%2CReflect.preventExtensions%2CReflect.set%2CReflect.setPrototypeOf%2CSet%2CString.prototype.trimStart%2CString.prototype.trimEnd%2CString.prototype.trim%2CString.prototype.startsWith%2CString.prototype.repeat%2CString.prototype.replaceAll%2CString.prototype.padStart%2CString.prototype.padEnd%2CMap%2CObject.seal%2Cconsole.groupEnd%2Cconsole.group"];
1
+ export const moduleName="@flatjs/evolve";export const configFileName="flatjs-evolve";export const viewportScripts='(function(d){var j;var b=1;var i=1;var h=750;var c=100;function e(s,o){var q=d.document;var l=q.documentElement;var k=navigator.userAgent;var m=k.toLowerCase().indexOf("android")>-1;i=d.devicePixelRatio||1;if(i>3){i=3}if(m){i=1}console.log("current devicePixelRatio:",i);l.setAttribute("data-dpr",i.toString());var p=q.querySelector(\'meta[name="viewport"]\');if(!p){b=1/i;p=q.createElement("meta");p.setAttribute("name","viewport");q.head.appendChild(p);p.setAttribute(["content","width=device-width,user-scalable=no,initial-scale=",b,",maximum-scale=",b,",minimum-scale=",b].join(""))}function n(){var t=document.documentElement.clientWidth;j=t/o*(s/i)*i;q.documentElement.style.fontSize=String(j)+"px"}var r;d.addEventListener("resize",function(){clearTimeout(r);r=setTimeout(n,300)},false);d.addEventListener("onload",n,false);n()}e(c,h);window.fabricViewport={currRem:j,currDpr:i,currScale:b,dpiPX2px:function f(k){return parseFloat(k.toString())/j*100+"px"},px2DPIpx:function a(k){return parseFloat(k.toString())/100*j+"px"},px2rem:function g(k){return parseFloat(k.toString())/100+"rem"}}})(window);';export const polyfill=["https://polyfill.io/v3/polyfill.min.js?features=Array.from%2CArray.isArray%2CArray.of%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.forEach%2CArray.prototype.flatMap%2CArray.prototype.keys%2CArray.prototype.indexOf%2CArray.prototype.includes%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CBlob%2CDataView%2CDate.now%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.freeze%2CObject.fromEntries%2CObject.getOwnPropertySymbols%2CObject.getOwnPropertyNames%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyDescriptor%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.isFrozen%2CObject.isSealed%2CObject.keys%2CObject.values%2CObject.setPrototypeOf%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.apply%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.getPrototypeOf%2CReflect.getOwnPropertyDescriptor%2CReflect.get%2CReflect.ownKeys%2CReflect.isExtensible%2CReflect.has%2CReflect.preventExtensions%2CReflect.set%2CReflect.setPrototypeOf%2CSet%2CString.prototype.trimStart%2CString.prototype.trimEnd%2CString.prototype.trim%2CString.prototype.startsWith%2CString.prototype.repeat%2CString.prototype.replaceAll%2CString.prototype.padStart%2CString.prototype.padEnd%2CMap%2CObject.seal%2Cconsole.groupEnd%2Cconsole.group"];export const devReactFastRefresh={runtime:"runtime",reactRefreshSetup:"reactRefreshSetup"};
@@ -1,3 +1,4 @@
1
1
  import { type Configuration } from 'webpack';
2
+ import { type EntryMapItem } from '../types/types-entry-map.js';
2
3
  import { type FlatEvolveWebpackOptions } from '../types/types-webpack.js';
3
- export declare const createOptimization: (serveMode: boolean, webpackOptions?: FlatEvolveWebpackOptions) => Configuration['optimization'];
4
+ export declare const createOptimization: (serveMode: boolean, webpackOptions: FlatEvolveWebpackOptions | undefined, entryItem: EntryMapItem) => Configuration['optimization'];
@@ -1 +1 @@
1
- import{createMinimizers}from"../minimizer/index.js";export const createOptimization=(e,i)=>({nodeEnv:e?"development":"production",chunkIds:"named",moduleIds:"named",minimize:!1!==i?.minimizer&&!e,minimizer:createMinimizers(e,i),splitChunks:{name:!1,chunks:"all",minSize:25e5,cacheGroups:{default:!1,defaultVendors:!1}}});
1
+ import{join}from"node:path";import{devReactFastRefresh}from"../constants.js";import{createMinimizers}from"../minimizer/index.js";export const createOptimization=(e,i={},n)=>({nodeEnv:e?"development":"production",chunkIds:"named",moduleIds:"named",runtimeChunk:!!e&&{name:()=>join(n[0],devReactFastRefresh.runtime)},minimize:!1!==i?.minimizer&&!e,minimizer:createMinimizers(e,i),splitChunks:{name:!1,chunks:"all",minSize:25e5,cacheGroups:{default:!1,defaultVendors:!1}}});
@@ -1 +1 @@
1
- import{assertOnlySingleEntryItem}from"../helpers/assert-only-single-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:n}=r,c=n?.watchOptions,i=assertOnlySingleEntryItem(t,r),m=createRuleSets(a,i,r);return{mode:e,plugins:await createPlugins(a,i,r),watchOptions:c,output:await createOutput(a,r),context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:m},devtool:a?"eval-source-map":s?.sourceMap||!1,externals:createExternals(s?.externals,i),performance:createPerformance(a,s?.performance),optimization:createOptimization(a,s),infrastructureLogging:s?.infrastructureLogging??{level:"warn"},stats:s?.stats??{preset:"minimal"},cache:{type:"memory"}}};
1
+ import{assertOnlySingleEntryItem}from"../helpers/assert-only-single-entry-item.js";import{createExternals}from"./create-externals.js";import{createOptimization}from"./create-optimization.js";import{createOutput}from"./create-output.js";import{createPerformance}from"./create-performance.js";import{createPlugins}from"./create-plugins.js";import{createResolve}from"./create-resolve.js";import{createRuleSets}from"./create-rule-sets.js";export const loadWebpackConfig=async(e,t,r)=>{const a="development"===e,{projectCwd:o,webpack:s,devServer:n}=r,c=n?.watchOptions,i=assertOnlySingleEntryItem(t,r),m=createRuleSets(a,i,r);return{mode:e,plugins:await createPlugins(a,i,r),watchOptions:c,output:await createOutput(a,r),context:o,target:s?.target??["web","es5"],resolve:createResolve(o,s),module:{rules:m},devtool:a?"eval-source-map":s?.sourceMap||!1,externals:createExternals(s?.externals,i),performance:createPerformance(a,s?.performance),optimization:createOptimization(a,s,i),infrastructureLogging:s?.infrastructureLogging??{level:"warn"},stats:s?.stats??{preset:"minimal"},cache:{type:"memory"}}};
@@ -1 +1 @@
1
- import{relative}from"node:path";import{chalk,logger,mergeOptions,urlJoin}from"@flatjs/common";import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";import{addCompilerToDevServer}from"./add-compiler-to-dev-server.js";export const createDevServerCompilerTasks=async(e,o,r,t)=>{const i=[];for(const[a,n]of Object.entries(r)){const l=n.entryConfig,s=l.options?.moduleFederation,p=shouldEnableReactFastRefresh(!0,[a,l],t);(s?.remotes||[]).forEach((e=>{e.endpoint=e=>{const o=r[e];if(!o)throw new Error(`No servedDevServerEntry found via "${e}"`);return urlJoin(o?.devServerHostUri,["/public"])}}));const{devServerPort:c,devServerHostUri:m}=r[a],f={[a]:l},d=urlJoin(m,["public"]),v=await loadWebpackConfig("development",f,mergeOptions(t,{webpack:{publicPath:d}})),h=webpack(splitToMultiCompilerConfigs(f,v,t)[0]);i.push(addCompilerToDevServer(h,p,c,t));const g=h.name||"";h.hooks.invalid.tap("fileChange",(o=>{const r=relative(e,o||"");logger.info(`file change ➩ ${chalk(["cyan"])(r)}`,g)})),h.hooks.done.tap("compileDone",(()=>{logger.info(`debug page ➩ ${chalk(["cyan"])(o)}`,g)}))}return i};
1
+ import{relative}from"node:path";import{chalk,logger,mergeOptions,urlJoin}from"@flatjs/common";import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{shouldEnableReactFastRefresh}from"../helpers/should-enable-react-fast-refresh.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";import{addCompilerToDevServer}from"./add-compiler-to-dev-server.js";export const createDevServerCompilerTasks=async(e,o,r,t)=>{const a=[];for(const[i,n]of Object.entries(r)){const l=n.entryConfig,s=l.options?.moduleFederation,p=shouldEnableReactFastRefresh(!0,[i,l],t);(s?.remotes||[]).forEach((e=>{e.endpoint=e=>{const o=r[e];if(!o)throw new Error(`No servedDevServerEntry found via "${e}"`);return urlJoin(o?.devServerHostUri,["/public"])}}));const{devServerPort:c,devServerHostUri:m}=r[i],f={[i]:l},d=urlJoin(m,["public"]),h=await loadWebpackConfig("development",f,mergeOptions(t,{webpack:{publicPath:d}})),v=shouldEnableReactFastRefresh(!0,[i,l],t),u=webpack(splitToMultiCompilerConfigs(f,h,t,v)[0]);a.push(addCompilerToDevServer(u,p,c,t));const g=u.name||"";u.hooks.invalid.tap("fileChange",(o=>{const r=relative(e,o||"");logger.info(`file change ➩ ${chalk(["cyan"])(r)}`,g)})),u.hooks.done.tap("compileDone",(()=>{logger.info(`debug page ➩ ${chalk(["cyan"])(o)}`,g)}))}return a};
@@ -1 +1 @@
1
- import{existsSync,readFileSync}from"node:fs";import{isAbsolute,join}from"node:path";import{ensureSlash,urlJoin}from"@flatjs/common";import _ from"lodash";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";import{getHtmlPluginConfig}from"../../helpers/get-html-plugin-config.js";import{getPackageDir}from"../../helpers/get-pacakge-dir.js";import{normalizeEvolveEntryName}from"../../helpers/normalize-entry-map.js";import{injectFederationScripts}from"../../helpers/script-injects.js";const getPageMainHtml=async(e,t,l)=>{const r=getPackageDir(),o=readFileSync(join(r,"./templates/main.html"),"utf-8"),a=[],i=l.projectVirtualPath.replace(/^\//,"");for(const[r,o]of Object.entries(l.entryMap)){const l=o.options?.servePageMainLinkFn||(e=>e),n=Object.keys(e).includes(r),s=normalizeEvolveEntryName(r,i),m=urlJoin(t,["pages",s],{env:"me"});a.push({name:r.replace(i,"").replace(/^\//,""),link:l(m,{hostUri:t,entryName:r,virtualPath:i}),flagText:n?"serve":"static",isServed:n?1:0})}const n={title:"@flatjs/evolve",modules:a.sort(((e,t)=>t.isServed-e.isServed))};return _.template(o)(n)},getPageModuleHtml=async(e,t,l,r,o)=>{const{entryMap:a,projectVirtualPath:i}=o,n=Object.keys(a).sort(((e,t)=>t.length-e.length)),s=getPackageDir(),m=n.find((e=>{const l=normalizeEvolveEntryName(e,i);return ensureSlash(t.path.replace(/^\//,""),!0).startsWith(ensureSlash(l,!0))}));if(!m){const e=readFileSync(join(s,"./templates/module-404.html"),"utf-8");return _.template(e)({title:"404 Not Found",errorMeta:[{name:"@flatjs/evolve workspace",value:s},{name:"served entry names",value:JSON.stringify(n)},{name:"module path",value:`${t.path}`}]})}const p=normalizeEvolveEntryName(m,i),c=a[m],u=c.options,d=e[m],g=d?.devServerHostUri||l,f=u?.serveModuleTemplate||"./templates/module.html",v=join(o.projectCwd,"./templates/module.html"),h=readFileSync(isAbsolute(f)?f:existsSync(v)?v:join(s,"./templates/module.html"),"utf-8"),S=o.devServer,y=S?.defaultServeGlobalData?await S.defaultServeGlobalData(c,l):{},j={mode:"development",envCdn:urlJoin(l,["public"])},P={title:getHtmlPluginConfig("title",j,u?.title),favicon:getHtmlPluginConfig("favicon",j,u?.favicon),viewport:allowPx2remForModule([m,c],o)?getHtmlPluginConfig("viewport",j,u?.viewport):"",headBeforeHtmlTags:getHtmlPluginConfig("headBeforeHtmlTags",j,u?.headBeforeHtmlTags),inlineScripts:getHtmlPluginConfig("inlineScripts",j,u?.inlineScripts),headBeforeStyles:getHtmlPluginConfig("headBeforeStyles",j,u?.headBeforeStyles),headBeforeScripts:getHtmlPluginConfig("headBeforeScripts",j,u?.headBeforeScripts),bodyAfterScripts:getHtmlPluginConfig("bodyAfterScripts",j,u?.bodyAfterScripts),moduleFederationScripts:injectFederationScripts({me:[urlJoin(l,["public"])]},o.multiHtmlCdnEnvResolver),global:{hostUrl:l,apiBase:urlJoin(l,[r]),virtualPath:join("/pages",i),moduleName:m.replace(i,"").replace(/^\//,""),...y,...u?.serveGlobalData||{}},styles:[urlJoin(g,[join("public",p,"bundle.css")])],scripts:[urlJoin(g,[join("public",p,"bundle.js")])]};return _.template(h)(P)};export const createPageMiddleware=(e,t,l,r)=>(r.devServer?.middlewares||[]).concat((async(o,a)=>{let i;i="/"===o.path?await getPageMainHtml(l,e,r):await getPageModuleHtml(l,o,e,t,r),a.send(i)}));
1
+ import{existsSync,readFileSync}from"node:fs";import{isAbsolute,join}from"node:path";import{ensureSlash,urlJoin}from"@flatjs/common";import _ from"lodash";import{devReactFastRefresh}from"../../constants.js";import{allowPx2remForModule}from"../../helpers/allow-px2rem-for-module.js";import{getHtmlPluginConfig}from"../../helpers/get-html-plugin-config.js";import{getPackageDir}from"../../helpers/get-pacakge-dir.js";import{normalizeEvolveEntryName}from"../../helpers/normalize-entry-map.js";import{injectFederationScripts}from"../../helpers/script-injects.js";import{shouldEnableReactFastRefresh}from"../../helpers/should-enable-react-fast-refresh.js";const getPageMainHtml=async(e,t,r)=>{const l=getPackageDir(),a=readFileSync(join(l,"./templates/main.html"),"utf-8"),o=[],i=r.projectVirtualPath.replace(/^\//,"");for(const[l,a]of Object.entries(r.entryMap)){const r=a.options?.servePageMainLinkFn||(e=>e),s=Object.keys(e).includes(l),n=normalizeEvolveEntryName(l,i),m=urlJoin(t,["pages",n],{env:"me"});o.push({name:l.replace(i,"").replace(/^\//,""),link:r(m,{hostUri:t,entryName:l,virtualPath:i}),flagText:s?"serve":"static",isServed:s?1:0})}const s={title:"@flatjs/evolve",modules:o.sort(((e,t)=>t.isServed-e.isServed))};return _.template(a)(s)},getPageModuleHtml=async(e,t,r,l,a)=>{const{entryMap:o,projectVirtualPath:i}=a,s=Object.keys(o).sort(((e,t)=>t.length-e.length)),n=getPackageDir(),m=s.find((e=>{const r=normalizeEvolveEntryName(e,i);return ensureSlash(t.path.replace(/^\//,""),!0).startsWith(ensureSlash(r,!0))}));if(!m){const e=readFileSync(join(n,"./templates/module-404.html"),"utf-8");return _.template(e)({title:"404 Not Found",errorMeta:[{name:"@flatjs/evolve workspace",value:n},{name:"served entry names",value:JSON.stringify(s)},{name:"module path",value:`${t.path}`}]})}const c=normalizeEvolveEntryName(m,i),p=o[m],d=p.options,u=e[m],f=u?.devServerHostUri||r,g=d?.serveModuleTemplate||"./templates/module.html",h=join(a.projectCwd,"./templates/module.html"),v=readFileSync(isAbsolute(g)?g:existsSync(h)?h:join(n,"./templates/module.html"),"utf-8"),S=a.devServer,j=S?.defaultServeGlobalData?await S.defaultServeGlobalData(p,r):{},y={mode:"development",envCdn:urlJoin(r,["public"])},P={title:getHtmlPluginConfig("title",y,d?.title),favicon:getHtmlPluginConfig("favicon",y,d?.favicon),viewport:allowPx2remForModule([m,p],a)?getHtmlPluginConfig("viewport",y,d?.viewport):"",headBeforeHtmlTags:getHtmlPluginConfig("headBeforeHtmlTags",y,d?.headBeforeHtmlTags),inlineScripts:getHtmlPluginConfig("inlineScripts",y,d?.inlineScripts),headBeforeStyles:getHtmlPluginConfig("headBeforeStyles",y,d?.headBeforeStyles),headBeforeScripts:getHtmlPluginConfig("headBeforeScripts",y,d?.headBeforeScripts),bodyAfterScripts:getHtmlPluginConfig("bodyAfterScripts",y,d?.bodyAfterScripts),moduleFederationScripts:injectFederationScripts({me:[urlJoin(r,["public"])]},a.multiHtmlCdnEnvResolver),global:{hostUrl:r,apiBase:urlJoin(r,[l]),virtualPath:join("/pages",i),moduleName:m.replace(i,"").replace(/^\//,""),...j,...d?.serveGlobalData||{}},styles:[urlJoin(f,[join("public",c,"bundle.css")])],scripts:[urlJoin(f,[join("public",c,"bundle.js")])]};if(e[m]&&shouldEnableReactFastRefresh(!0,[c,p],a)){const e=[devReactFastRefresh.runtime,devReactFastRefresh.reactRefreshSetup];P.headBeforeHtmlTags?P.headBeforeHtmlTags=P.headBeforeHtmlTags.slice(0):P.headBeforeHtmlTags=[],e.forEach((e=>{const t=urlJoin(f,[join("public",join(c,e),"bundle.js")]);P.headBeforeHtmlTags?.push(`<script src="${t}"><\/script>`)}))}return _.template(v)(P)};export const createPageMiddleware=(e,t,r,l)=>(l.devServer?.middlewares||[]).concat((async(a,o)=>{let i;i="/"===a.path?await getPageMainHtml(r,e,l):await getPageModuleHtml(r,a,e,t,l),o.send(i)}));
@@ -5,4 +5,4 @@ import { type FlatEvolveOptions } from '../types/types-options.js';
5
5
  * Split the `webpack` to make sure that we have separated compiler process for each module
6
6
  * @param webpackConfig `Omit<Configuration, 'entry'>` webpack final configuration
7
7
  */
8
- export declare function splitToMultiCompilerConfigs(servedEntries: EvolveEntryMap, webpackConfig: Omit<Configuration, 'entry'>, evolveOptions: FlatEvolveOptions): Configuration[];
8
+ export declare function splitToMultiCompilerConfigs(servedEntries: EvolveEntryMap, webpackConfig: Omit<Configuration, 'entry'>, evolveOptions: FlatEvolveOptions, enableHmr?: boolean): Configuration[];
@@ -1 +1 @@
1
- import{mergeOptions}from"@flatjs/common";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function splitToMultiCompilerConfigs(e,o,t){const r=[];for(const[o,n]of Object.entries(e)){const e=normalizeEvolveEntryName(o,t.projectVirtualPath);r.push({[e]:n.entry})}return r.map((e=>mergeOptions(o,{name:Object.keys(e)[0],entry:e})))}
1
+ import{join}from"path";import{mergeOptions}from"@flatjs/common";import{devReactFastRefresh}from"../constants.js";import{normalizeEvolveEntryName}from"./normalize-entry-map.js";export function splitToMultiCompilerConfigs(e,t,r,o=!1){const n=[];for(const[t,o]of Object.entries(e)){const e=normalizeEvolveEntryName(t,r.projectVirtualPath);n.push({[e]:o.entry})}return n.map((e=>{const r=Object.keys(e)[0];if(o){e[join(r,devReactFastRefresh.reactRefreshSetup)]=["@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js"]}return mergeOptions(t,{name:r,entry:e})}))}
@@ -1 +1 @@
1
- import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";export const startOneEntryBuild=async(r,o)=>{const t=await loadWebpackConfig("production",r,o),n=splitToMultiCompilerConfigs(r,t,o);if(n.length>1)throw new Error("startOneEntryBuild() only support `compiler` at a time");const e=n[0];return new Promise(((r,t)=>{webpack(e,((n,i)=>{if(n)return t(n);const a=i?.toJson();return a?.errors?.length?t(a.errors):o.rejectWarnings&&a?.warnings?.length?t(a.warnings):void r({name:e.name,warningStats:a?.warnings})}))}))};
1
+ import webpack from"webpack";import{loadWebpackConfig}from"../create-webpack/load-webpack-config.js";import{splitToMultiCompilerConfigs}from"../helpers/split-to-multi-compiler.js";export const startOneEntryBuild=async(r,o)=>{const t=await loadWebpackConfig("production",r,o),n=splitToMultiCompilerConfigs(r,t,o,!1);if(n.length>1)throw new Error("startOneEntryBuild() only support `compiler` at a time");const e=n[0];return new Promise(((r,t)=>{webpack(e,((n,i)=>{if(n)return t(n);const a=i?.toJson();return a?.errors?.length?t(a.errors):o.rejectWarnings&&a?.warnings?.length?t(a.warnings):void r({name:e.name,warningStats:a?.warnings})}))}))};
@@ -16,7 +16,7 @@ export interface Options {
16
16
  include?: RegExp;
17
17
  /**
18
18
  * add errors to webpack instead of warnings
19
- * @default true
19
+ * @default false
20
20
  */
21
21
  failOnError?: boolean;
22
22
  /**
@@ -1 +1 @@
1
- import{relative}from"node:path";import{mergeOptions}from"@flatjs/common";import Graph from"tarjan-graph";import webpack from"webpack";const BASE_ERROR="Circular dependency detected:\r\n",PLUGIN_TITLE="CircularDependencyPlugin";export class CircularDependencyPlugin{constructor(o={}){this.options=mergeOptions({exclude:/node_modules/,include:/.*/,failOnError:!0,allowAsyncCycles:!1,projectCwd:process.cwd()},o)}apply(o){const e=this.options.projectCwd;o.hooks.compilation.tap(PLUGIN_TITLE,(o=>{o.hooks.optimizeModules.tap(PLUGIN_TITLE,(t=>{this.options.onStart&&this.options.onStart({compilation:o});const n=new(Graph.default||Graph);for(const e of t){const t=[];for(const n of e.dependencies){if(n.constructor&&"CommonJsSelfReferenceDependency"===n.constructor.name)continue;let r=null;r=o.moduleGraph?o.moduleGraph.getModule(n):n.module,r&&(r instanceof webpack.NormalModule&&r.resource&&(this.options.allowAsyncCycles&&n.weak||e!==r&&t.push(r.identifier())))}n.add(e.identifier(),t)}const r=n.getCycles();this.isCyclic(r,o,e),this.options.onEnd&&this.options.onEnd({compilation:o})}))}))}isCyclic(o,e,t){o.forEach((o=>{const n=o.slice().reverse().map((o=>{const t=e.findModule(o.name);return t instanceof webpack.NormalModule&&t.resource||null}));if(n.every((o=>!o||this.options.exclude.test(o)||!this.options.include.test(o))))return;const r=n.map((o=>relative(t,o)));if(this.options.onDetected){try{this.options.onDetected({paths:r.concat([r[0]]),compilation:e})}catch(o){e.errors.push(o)}return}const s=new Error(BASE_ERROR.concat(r.concat([r[0]]).join(" -> ")));this.options.failOnError?e.errors.push(s):e.warnings.push(s)}))}}
1
+ import{relative}from"node:path";import{mergeOptions}from"@flatjs/common";import Graph from"tarjan-graph";import webpack from"webpack";const BASE_ERROR="Circular dependency detected:\r\n",PLUGIN_TITLE="CircularDependencyPlugin";export class CircularDependencyPlugin{constructor(o={}){this.options=mergeOptions({exclude:/node_modules/,include:/.*/,failOnError:!1,allowAsyncCycles:!1,projectCwd:process.cwd()},o)}apply(o){const e=this.options.projectCwd;o.hooks.compilation.tap(PLUGIN_TITLE,(o=>{o.hooks.optimizeModules.tap(PLUGIN_TITLE,(t=>{this.options.onStart&&this.options.onStart({compilation:o});const n=new(Graph.default||Graph);for(const e of t){const t=[];for(const n of e.dependencies){if(n.constructor&&"CommonJsSelfReferenceDependency"===n.constructor.name)continue;let r=null;r=o.moduleGraph?o.moduleGraph.getModule(n):n.module,r&&(r instanceof webpack.NormalModule&&r.resource&&(this.options.allowAsyncCycles&&n.weak||e!==r&&t.push(r.identifier())))}n.add(e.identifier(),t)}const r=n.getCycles();this.isCyclic(r,o,e),this.options.onEnd&&this.options.onEnd({compilation:o})}))}))}isCyclic(o,e,t){o.forEach((o=>{const n=o.slice().reverse().map((o=>{const t=e.findModule(o.name);return t instanceof webpack.NormalModule&&t.resource||null}));if(n.every((o=>!o||this.options.exclude.test(o)||!this.options.include.test(o))))return;const r=n.map((o=>relative(t,o)));if(this.options.onDetected){try{this.options.onDetected({paths:r.concat([r[0]]),compilation:e})}catch(o){e.errors.push(o)}return}const s=new Error(BASE_ERROR.concat(r.concat([r[0]]).join(" -> ")));this.options.failOnError?e.errors.push(s):e.warnings.push(s)}))}}
@@ -53,6 +53,8 @@ export declare type MultiHtmlCDNEntryItem = {
53
53
  headBeforeStyles?: HtmlPluginConfigTokenType<string[]>;
54
54
  /**
55
55
  * The ordered scripts will be injected before html head.
56
+ * Note in `serve` mode we will auto remove `react`,`react-dom`('react.development.js', 'react-dom.development.js') from CDN, and use internal inject to enable `HMR`
57
+ * Or you must use `react devTool` chrome extension.
56
58
  * @default [
57
59
  * `https://polyfill.io/v3/polyfill.min.js?features=Array.from%2CArray.isArray%2CArray.of%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.forEach%2CArray.prototype.flatMap%2CArray.prototype.keys%2CArray.prototype.indexOf%2CArray.prototype.includes%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CBlob%2CDataView%2CDate.now%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.freeze%2CObject.fromEntries%2CObject.getOwnPropertySymbols%2CObject.getOwnPropertyNames%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyDescriptor%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.isFrozen%2CObject.isSealed%2CObject.keys%2CObject.values%2CObject.setPrototypeOf%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.apply%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.getPrototypeOf%2CReflect.getOwnPropertyDescriptor%2CReflect.get%2CReflect.ownKeys%2CReflect.isExtensible%2CReflect.has%2CReflect.preventExtensions%2CReflect.set%2CReflect.setPrototypeOf%2CSet%2CString.prototype.trimStart%2CString.prototype.trimEnd%2CString.prototype.trim%2CString.prototype.startsWith%2CString.prototype.repeat%2CString.prototype.replaceAll%2CString.prototype.padStart%2CString.prototype.padEnd%2CMap%2CObject.seal%2Cconsole.groupEnd%2Cconsole.group`,
58
60
  * `https://unpkg.com/react@17.0.2/umd/react.production.min.js`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatjs/evolve",
3
- "version": "1.8.1-next.107",
3
+ "version": "1.8.1-next.109",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -37,17 +37,17 @@
37
37
  "typecheck": "tsc --project ./tsconfig.json --noEmit"
38
38
  },
39
39
  "dependencies": {
40
- "@armit/config-loader": "^0.0.53",
41
- "@armit/file-utility": "^0.0.30",
42
- "@armit/git": "^0.0.38",
43
- "@armit/package": "^0.0.47",
44
- "@armit/worker-threads": "^0.0.7",
45
- "@babel/core": "7.22.10",
46
- "@flatjs/common": "1.8.1-next.38",
47
- "@flatjs/evolve-preset-babel": "1.8.1-next.23",
48
- "@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.38",
49
- "@flatjs/graph": "1.8.1-next.57",
50
- "@flatjs/mock": "1.8.1-next.81",
40
+ "@armit/config-loader": "^0.0.54",
41
+ "@armit/file-utility": "^0.0.31",
42
+ "@armit/git": "^0.0.39",
43
+ "@armit/package": "^0.0.48",
44
+ "@armit/worker-threads": "^0.0.8",
45
+ "@babel/core": "7.22.17",
46
+ "@flatjs/common": "1.8.1-next.39",
47
+ "@flatjs/evolve-preset-babel": "1.8.1-next.24",
48
+ "@flatjs/forge-postcss-plugin-pixel": "1.8.1-next.39",
49
+ "@flatjs/graph": "1.8.1-next.58",
50
+ "@flatjs/mock": "1.8.1-next.82",
51
51
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
52
52
  "@types/babel__core": "7.20.1",
53
53
  "babel-loader": "9.1.3",
@@ -59,7 +59,7 @@
59
59
  "cssnano": "6.0.1",
60
60
  "express": "4.18.2",
61
61
  "fork-ts-checker-webpack-plugin": "8.0.0",
62
- "happy-dom": "10.10.0",
62
+ "happy-dom": "11.0.6",
63
63
  "html-webpack-plugin": "5.5.3",
64
64
  "image-minimizer-webpack-plugin": "3.8.3",
65
65
  "less": "4.2.0",
@@ -67,41 +67,41 @@
67
67
  "listr": "0.14.3",
68
68
  "lodash": "4.17.21",
69
69
  "mini-css-extract-plugin": "2.7.6",
70
- "postcss": "8.4.28",
70
+ "postcss": "8.4.29",
71
71
  "postcss-loader": "7.3.3",
72
72
  "react-refresh": "0.14.0",
73
73
  "svgo": "3.0.2",
74
74
  "tarjan-graph": "3.0.0",
75
75
  "terser-webpack-plugin": "5.3.9",
76
76
  "tsconfig-paths-webpack-plugin": "4.1.0",
77
- "type-fest": "^4.2.0",
77
+ "type-fest": "^4.3.1",
78
78
  "webpack": "5.88.2",
79
- "webpack-bundle-analyzer": "4.9.0",
79
+ "webpack-bundle-analyzer": "4.9.1",
80
80
  "webpack-dev-server": "4.15.1",
81
81
  "webpack-sources": "3.2.3"
82
82
  },
83
83
  "devDependencies": {
84
- "@armit/eslint-config-bases": "^0.0.25",
85
- "@flatjs/testing": "1.8.1-next.41",
86
- "@swc/core": "1.3.77",
84
+ "@armit/eslint-config-bases": "^0.0.26",
85
+ "@flatjs/testing": "1.8.1-next.42",
86
+ "@swc/core": "1.3.84",
87
87
  "@types/express": "4.17.17",
88
- "@types/listr": "0.14.4",
89
- "@types/node": "20.5.0",
90
- "@vitest/coverage-istanbul": "0.34.1",
91
- "@vitest/ui": "0.34.1",
92
- "eslint": "8.47.0",
88
+ "@types/listr": "0.14.5",
89
+ "@types/node": "20.6.0",
90
+ "@vitest/coverage-istanbul": "0.34.4",
91
+ "@vitest/ui": "0.34.4",
92
+ "eslint": "8.49.0",
93
93
  "imagemin-gifsicle": "7.0.0",
94
94
  "imagemin-jpegtran": "7.0.0",
95
95
  "imagemin-pngquant": "9.0.2",
96
96
  "imagemin-svgo": "10.0.1",
97
97
  "npm-run-all": "4.1.5",
98
- "prettier": "3.0.2",
98
+ "prettier": "3.0.3",
99
99
  "react": "18.2.0",
100
100
  "rimraf": "5.0.1",
101
101
  "swc-unplugin-ts": "1.0.2",
102
102
  "ts-node": "10.9.1",
103
- "vite-tsconfig-paths": "4.2.0",
104
- "vitest": "0.34.1",
103
+ "vite-tsconfig-paths": "4.2.1",
104
+ "vitest": "0.34.4",
105
105
  "vue-loader": "17.2.2"
106
106
  },
107
107
  "peerDependencies": {
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,41 +17,45 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %>
23
+ <% } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
23
26
  <script>
24
27
  <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
28
  <%= inlineScripts[index] %>
26
29
  <% } %>
27
30
  </script>
28
- <% } %> <% if (viewport) { %>
31
+ <% } %>
32
+ <% if (viewport) { %>
29
33
  <script>
30
34
  <%= viewport %>
31
35
  </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (headBeforeScripts) { %> <% for (let index = 0; index
39
- < headBeforeScripts.length; index++) { %>
40
- <script
41
- crossorigin="anonymous"
42
- src="<%= headBeforeScripts[index]%>"
43
- ></script>
44
- <% } %> <% } %>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (headBeforeScripts) { %>
47
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
48
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
49
+ <% } %>
50
+ <% } %>
45
51
  </head>
46
52
 
47
53
  <body>
48
54
  <div id="app"></div>
49
- <% if (bodyAfterScripts) { %> <% for (let index = 0; index <
50
- bodyAfterScripts.length; index++) { %>
51
- <script
52
- crossorigin="anonymous"
53
- src="<%= bodyAfterScripts[index]%>"
54
- ></script>
55
- <% } %> <% } %>
55
+ <% if (bodyAfterScripts) { %>
56
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
57
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
58
+ <% } %>
59
+ <% } %>
56
60
  </body>
57
61
  </html>
@@ -17,39 +17,47 @@
17
17
  />
18
18
  <title><%= title %></title>
19
19
 
20
- <% if (headBeforeHtmlTags) { %> <% for (let index = 0; index <
21
- headBeforeHtmlTags.length; index++) { %> <%= headBeforeHtmlTags[index] %> <%
22
- } %> <% } %> <% if (inlineScripts) { %>
23
- <script>
24
- <% for (let index = 0; index < inlineScripts.length; index++) { %>
25
- <%= inlineScripts[index] %>
26
- <% } %>
27
- </script>
28
- <% } %> <% if (viewport) { %>
29
- <script>
30
- <%= viewport %>
31
- </script>
32
- <% } %> <% if (favicon) { %>
33
- <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
34
- <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
35
- <% } %> <% if (headBeforeStyles) { %> <% for (let index = 0; index <
36
- headBeforeStyles.length; index++) { %>
37
- <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
38
- <% } %> <% } %> <% if (styles.length) { %> <% _.forEach(styles, (css)=> { %>
39
- <link href="<%= css %>" rel="stylesheet" />
40
- <% }) %> <% } %>
20
+ <% if (headBeforeHtmlTags) { %>
21
+ <% for (let index = 0; index < headBeforeHtmlTags.length; index++) { %>
22
+ <%= headBeforeHtmlTags[index] %> <%
23
+ } %>
24
+ <% } %>
25
+ <% if (inlineScripts) { %>
26
+ <script>
27
+ <% for (let index = 0; index < inlineScripts.length; index++) { %>
28
+ <%= inlineScripts[index] %>
29
+ <% } %>
30
+ </script>
31
+ <% } %>
32
+ <% if (viewport) { %>
33
+ <script>
34
+ <%= viewport %>
35
+ </script>
36
+ <% } %>
37
+ <% if (favicon) { %>
38
+ <link rel="shortcut icon" href="<%= favicon %>" type="image/x-icon" />
39
+ <link rel="icon" href="<%= favicon %>" type="image/x-icon" />
40
+ <% } %>
41
+ <% if (headBeforeStyles) { %>
42
+ <% for (let index = 0; index < headBeforeStyles.length; index++) { %>
43
+ <link href="<%= headBeforeStyles[index] %>" rel="stylesheet" />
44
+ <% } %>
45
+ <% } %>
46
+ <% if (styles.length) { %>
47
+ <% _.forEach(styles, (css)=> { %>
48
+ <link href="<%= css %>" rel="stylesheet" />
49
+ <% }) %>
50
+ <% } %>
41
51
 
42
52
  <script>
43
53
  window.GLOBAL = <%= JSON.stringify(Object.assign(global, {})) %>;
44
54
  </script>
45
55
 
46
- <% if (headBeforeScripts) { %> <% for (let index = 0; index <
47
- headBeforeScripts.length; index++) { %>
48
- <script
49
- crossorigin="anonymous"
50
- src="<%= headBeforeScripts[index]%>"
51
- ></script>
52
- <% } %> <% } %>
56
+ <% if (headBeforeScripts) { %>
57
+ <% for (let index = 0; index < headBeforeScripts.length; index++) { %>
58
+ <script crossorigin="anonymous" src="<%= headBeforeScripts[index]%>"></script>
59
+ <% } %>
60
+ <% } %>
53
61
  </head>
54
62
 
55
63
  <body>
@@ -58,14 +66,16 @@
58
66
  <script>
59
67
  <%= moduleFederationScripts %>
60
68
  </script>
61
- <% } %> <% if (scripts.length) { %> <% _.forEach(scripts, (js)=> { %>
62
- <script src="<%= js %>"></script>
63
- <% }) %> <% } %> <% if (bodyAfterScripts) { %> <% for (let index = 0; index
64
- < bodyAfterScripts.length; index++) { %>
65
- <script
66
- crossorigin="anonymous"
67
- src="<%= bodyAfterScripts[index]%>"
68
- ></script>
69
- <% } %> <% } %>
69
+ <% } %>
70
+ <% if (scripts.length) { %>
71
+ <% _.forEach(scripts, (js)=> { %>
72
+ <script src="<%= js %>"></script>
73
+ <% }) %>
74
+ <% } %>
75
+ <% if (bodyAfterScripts) { %>
76
+ <% for (let index = 0; index < bodyAfterScripts.length; index++) { %>
77
+ <script crossorigin="anonymous" src="<%= bodyAfterScripts[index]%>"></script>
78
+ <% } %>
79
+ <% } %>
70
80
  </body>
71
81
  </html>