title: Angular 10 service depends on 'rxjs/observable/dom/WebSocketSubject'. CommonJS or AMD dependencies can cause optimization bailouts
body: <p>While build Angular application getting warning message like as below:</p>
  <p>WARNING in /Users/deb/Documents/ProjectName/src/app/services/filename.service.ts depends on 'rxjs/observable/dom/WebSocketSubject'. CommonJS or AMD dependencies can cause optimization bailouts.
  For more info see: <a href="https://angular.io/guide/build#configuring-commonjs-dependencies" rel="nofollow noreferrer">https://angular.io/guide/build#configuring-commonjs-dependencies</a></p>
  <pre><code>&quot;allowedCommonJsDependencies&quot;: [
              &quot;lodash&quot;
            ],
  </code></pre>
  <p>Even we follow angular guide line its still giving same warning message.</p>
  <p>Angular version : 10.x</p>
  <p>So how to fix it.</p>