Skip to content

Service worker, angular cli 6.0.0-beta6 build --prod doesn't produce ngsw-worker.js and ngsw-config.json #10042

@yjhatfdu

Description

@yjhatfdu

Versions

Angular CLI: 6.0.0-beta.6
Node: 9.8.0
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

@angular/cli: 6.0.0-beta.6
@angular-devkit/architect: 0.0.7
@angular-devkit/build-optimizer: 0.4.6
@angular-devkit/build-webpack: 0.0.7
@angular-devkit/core: 0.4.6
@angular-devkit/schematics: 0.4.6
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 6.0.0-beta.6
@schematics/angular: 0.4.6
@schematics/package-update: 0.4.6
typescript: 2.5.3
webpack: 4.1.1

Repro steps

  • Step 1
    run ng new swtest --service-worker
  • Step 2
    run ng build --prod in project directory

Observed behavior

no ngsw-worker.js and ngsw-config.json found in ./dist/

Desired behavior

ngsw-worker.js and ngsw-config.json should be found in ./dist/

Mention any other details that might be useful (optional)

It works fine in Angular 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions