Skip to content

Commit

Permalink
fix(): skip initHtml when not serving
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 29, 2019
1 parent a471074 commit ecafff2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/compiler/build/init-index-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ export async function initIndexHtmls(config: d.Config, compilerCtx: d.CompilerCt
// The initial loading page connects with the stencil's devServer
// If we are building without server, it does not make sense to write the
// initial index.html
if (!config.devServer) {
return;
if (config.flags.serve) {
await Promise.all(config.outputTargets.map(async outputTarget => {
await initIndexHtml(config, compilerCtx, buildCtx, outputTarget);
}));
}
await Promise.all(config.outputTargets.map(async outputTarget => {
await initIndexHtml(config, compilerCtx, buildCtx, outputTarget);
}));
}


Expand Down

0 comments on commit ecafff2

Please sign in to comment.