Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/@angular/cli/utilities/service-worker/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Filesystem } from '@angular/service-worker/config';
import { stripIndent } from 'common-tags';
import { oneLine } from 'common-tags';
import * as crypto from 'crypto';
import * as fs from 'fs';
import * as path from 'path';
Expand Down Expand Up @@ -71,9 +71,9 @@ export function augmentAppWithServiceWorker(projectRoot: string, appRoot: string
const configPath = path.resolve(appRoot, 'ngsw-config.json');

if (!fs.existsSync(configPath)) {
throw new Error(stripIndent`Expected to find an ngsw-config.json configuration file in the
application root. Either provide one or disable Service Worker
build support in angular-cli.json.`);
throw new Error(oneLine`Error: Expected to find an ngsw-config.json configuration
file in the ${appRoot} folder. Either provide one or disable Service Worker
in .angular-cli.json.`);
}
const config = fs.readFileSync(configPath, 'utf8');

Expand Down