How to properly import and use the MSAL (Microsoft Authentication Library for js) into a typescript react single page application?

前端 未结 4 2027
慢半拍i
慢半拍i 2020-12-15 06:02

Problem

I can\'t seem to get the MSAL library to import properly into my typescript code. I\'m using the MSAL for JS library (which is supposed to have typings) in

4条回答
  •  误落风尘
    2020-12-15 06:09

    If you install the exports-loader (npm install exports-loader --save-dev) you can avoid the script tag and add the following to your directives:

    var Msal = require("exports-loader?Msal!../../../node_modules/msal/out/msal.js"); 
    

提交回复
热议问题