The checks on existence of @angular/service-worker used the node_modules relative to the
project root directly, but those don't exist when using yarn workspaces or lerna. Use
resolve.sync instead, which looks up the tree to parent node_modules folders.
A similar change is required when loading the service worker script from the
@angular/service-worker package. Switch to require.resolve here as well.
Fixes#8300
Uses existing Protractor API to run it directly instead of using `npm run
e2e`.
Also adds support for the following flags: `--serve`, `--config`,
`--specs`, `--element-explorer`, `--webdriver-update`.
Fix#4256Fix#4478
BREAKING CHANGE: `ng e2e` no longer needs `ng serve` to be running.