title: How to add external js file in angular 6 library
body: <p>I am creating an angular library (version 6) which is based on angular material for which I need to include the hammer js library. </p>
  
  <p>I know that in angular 6 we can add the external js library in the <code>angular.json</code> under the project's configuration. But this does not work in case of above library. I tried to add the external library in the following way.</p>
  
  <pre><code>"my-library": {
    "root": "projects/my-library",
    "sourceRoot": "projects/my-library/src",
    "projectType": "library",
    "architect": {
      "build": {
        "builder": "@angular-devkit/build-ng-packagr:build",
        "options": {
          "tsConfig": "projects/my-library/tsconfig.lib.json",
          "project": "projects/my-library/ng-package.json",
          "scripts": [
            "../node_modules/hammerjs/hammer.min.js"
          ]
        }
      }
  }
  </code></pre>
  
  <p>But I am getting this error.</p>
  
  <blockquote>
    <p>Schema validation failed with the following errors:
      Data path "" should NOT have additional properties(scripts).</p>
  </blockquote>
  
  <p>Please suggest what is the correct way to add external js file in the angular library.</p>