title: Angular 5 with Cli alasql can't find xlsx.js
body: <p>xlsx from JSON with alasql and xlsx. I was able to generate a xls with alasql, but the xlsx generation fails. I added the script to the cli and the compiler has no errors.</p>
  
  <p>When I call the function genXlsx(), which does the rendering, I get a console-error:
  <a href="https://i.stack.imgur.com/n8TCh.png" rel="nofollow noreferrer">Error</a></p>
  
  <p>StatsComponent.ts</p>
  
  <pre><code>import * as alasql from 'alasql';
  
  export class StatsComponent {
    genXlsx(): void {   
      const data1 = [{ a: 1, b: 10 }, { a: 2, b: 20 }];
      const data2 = [{ a: 100, b: 10 }, { a: 200, b: 20 }];
      const opts = [{ sheetid: 'Good', header: true }, { sheetid: 'Two', header: false }];
      const res = alasql('SELECT INTO XLSX("MyAwesomeData.xlsx",?) FROM ?', [opts, [data1, data2]]);
    }
  }
  </code></pre>
  
  <p>Package.json</p>
  
  <pre><code>"dependencies": {
      "@angular/animations": "^5.0.2",
      "@angular/common": "^5.0.2",
      "@angular/compiler": "^5.0.2",
      "@angular/core": "^5.0.2",
      "@angular/forms": "^5.0.2",
      "@angular/material": "^5.0.0-rc.1",
      "@angular/platform-browser": "^5.0.2",
      "@angular/platform-browser-dynamic": "^5.0.2",
      "@angular/router": "^5.0.2",
      "@ngx-translate/core": "^8.0.0",
      "@ngx-translate/http-loader": "^2.0.0",
      "@types/jspdf": "^1.1.31",
      "alasql": "^0.4.5",
      "bootstrap": "^3.3.7",
      "chart.js": "^2.7.1",
      "core-js": "^2.4.1",
      "font-awesome": "^4.7.0",
      "html2canvas": "^1.0.0-alpha.8",
      "jspdf": "^1.3.5",
      "responsive-directives-angular2": "^0.4.2",
      "rxjs": "^5.1.0",
      "xlsx": "^0.12.4",
      "zone.js": "^0.8.4"
    },
    "devDependencies": {
      "@angular/cli": "^1.7.3",
      "@angular/compiler-cli": "^5.0.2",
      "@compodoc/compodoc": "^1.0.5",
      "@types/jasmine": "2.8.2",
      "@types/node": "^8.0.58",
      "codelyzer": "~4.0.1",
      "jasmine-core": "~2.8.0",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~1.7.1",
      "karma-chrome-launcher": "~2.2.0",
      "karma-cli": "~1.0.1",
      "karma-coverage-istanbul-reporter": "^1.3.0",
      "karma-jasmine": "~1.1.0",
      "karma-jasmine-html-reporter": "^0.2.2",
      "karma-phantomjs-launcher": "^1.0.4",
      "node-sass": "^4.7.2",
      "protractor": "~5.2.0",
      "sass-loader": "^6.0.6",
      "ts-node": "~3.3.0",
      "tslint": "~5.8.0",
      "typescript": "~2.6.1",
      "webpack": "^3.10.0"
    }
  </code></pre>
  
  <p>.angular-cli.json</p>
  
  <pre><code> "scripts": [
      "../node_modules/xlsx/dist/xlsx.core.min.js",
      "../node_modules/jspdf/dist/jspdf.min.js",
      "../node_modules/chart.js/src/chart.js",
      "../node_modules/alasql/dist/alasql.min.js"
    ],
  </code></pre>
  
  <p>Can someone help me with this? thanks :)</p>