xshell 1.0.174 → 1.0.175
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/builder.js +3 -2
- package/package.json +1 -1
package/builder.js
CHANGED
|
@@ -487,7 +487,8 @@ export class Bundler {
|
|
|
487
487
|
]);
|
|
488
488
|
}
|
|
489
489
|
async build_htmls(print = { info: true, files: false }) {
|
|
490
|
-
|
|
490
|
+
const root = this.assets_root || './';
|
|
491
|
+
await Promise.all(Object.entries(this.htmls).map(async ([fp_html, { fp_entry = `${root}index.js`, device_viewport: device_width = false, icon, manifest, dependencies: _dependencies = this.dependencies, title, scripts, mscripts, notice = false, heads, }]) => {
|
|
491
492
|
const fpd_html = `${this.fpd_out}${fp_html}`.fdir;
|
|
492
493
|
const resolve = (asset) => this.assets_root ?
|
|
493
494
|
`${this.assets_root}${typeof asset === 'string' ? asset : asset.out}`
|
|
@@ -502,7 +503,7 @@ export class Bundler {
|
|
|
502
503
|
(device_width ? " <meta name='viewport' content='width=device-width, initial-scale=1.0' />\n" : '') +
|
|
503
504
|
(icon ? ` <link rel='icon' href='${resolve(icon)}' />\n` : '') +
|
|
504
505
|
(manifest ? ` <link rel='manifest' href='${resolve(manifest)}' />\n` : '') +
|
|
505
|
-
this.resolve_dependency_files(_dependencies, false, { production: this.production }).map(fp => ` <script src='
|
|
506
|
+
this.resolve_dependency_files(_dependencies, false, { production: this.production }).map(fp => ` <script src='${root}vendors/${fp}' defer></script>`).join_lines() +
|
|
506
507
|
(scripts?.before ? scripts.before.map(asset => ` <script src='${resolve(asset)}' defer></script>`).join_lines() : '') +
|
|
507
508
|
(mscripts ? mscripts.map(mscript => ` <script src='${resolve(mscript)}' type='module'></script>`).join_lines() : '') +
|
|
508
509
|
` <script src='${fp_entry}' type='module'></script>\n` +
|