Skip to content

Commit

Permalink
fix(build): skip initIndexHtml if there is not devServer
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed May 20, 2019
1 parent 3cd220c commit 4841b6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compiler/build/init-index-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import { isOutputTargetWww } from '../output-targets/output-utils';


export async function initIndexHtmls(config: d.Config, compilerCtx: d.CompilerCtx, buildCtx: d.BuildCtx) {
// 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;
}
await Promise.all(config.outputTargets.map(async outputTarget => {
await initIndexHtml(config, compilerCtx, buildCtx, outputTarget);
}));
Expand Down

0 comments on commit 4841b6e

Please sign in to comment.