Skip to content

Commit 4841b6e

Browse files
committed
fix(build): skip initIndexHtml if there is not devServer
1 parent 3cd220c commit 4841b6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/compiler/build/init-index-html.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ import { isOutputTargetWww } from '../output-targets/output-utils';
44

55

66
export async function initIndexHtmls(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx) {
7+
// The initial loading page connects with the stencil's devServer
8+
// If we are building without server, it does not make sense to write the
9+
// initial index.html
10+
if (!config.devServer) {
11+
return;
12+
}
713
await Promise.all(config.outputTargets.map(async outputTarget => {
814
await initIndexHtml(config, compilerCtx, buildCtx, outputTarget);
915
}));

0 commit comments

Comments
 (0)