Is there a way to use cdn files with reactjs using webpack?

后端 未结 2 2004
没有蜡笔的小新
没有蜡笔的小新 2021-02-09 06:39

I am not able to configure pusher and fetch using npm in reactjs.Also,is there any way to use cdn inside your react code?

2条回答
  •  抹茶落季
    2021-02-09 06:54

    Finally i came up with a very simple answer

    install npm pusher-js,es6-promise and isomorphic-fetch and import it as

    var Pusher=require('pusher-js');
    var fetch=require('isomorphic-fetch');
    require('es6-promise').polyfill();
    

提交回复
热议问题