Importing JS in Angular CLI 1.2.4

Viewed 479

I am trying to do a cound integration to my existing angular project

https://www.npmjs.com/package/kount-access-api

I Installed the NPM module and obviously it in JS and not TS and so i used the below lines in angular-cli.json

 "scripts": [
        "../node_modules/kount-access-api/lib/kount-access-api.js"
      ],

However i am getting below error in console,

Uncaught ReferenceError: require is not defined at eval (eval at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9), :25:14) at eval () at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9) at Object.../../../../script-loader/index.js!../../../../kount-access-api/lib/kount-access-api.js (kount-access-api.js?9331:1) at webpack_require (bootstrap a89535f…:54) at Object.2 (scripts.bundle.js:37) at webpack_require (bootstrap a89535f…:54) at webpackJsonpCallback (bootstrap a89535f…:25) at scripts.bundle.js:1

Any pointers is appreciated

1 Answers
Related