我正在构建一个Angular2应用程序,它在我的构建过程中使用了Webpack。我想在我的应用程序中创建一个Google oauth登录功能。因此,我已经从npm安装了googleapi包。但是我在将这个包导入到我的应用程序时遇到了一些问题。我正在尝试import * from 'googleapi';,但这会导致应用程序崩溃,并显示以下消息:
Uncaught ReferenceError: require is not defi
我想使用下面的代码作为将用户输入翻译成英语的程序的基础。我收到错误消息“找不到symbol -GoogleApi”。有没有人能帮我想想该怎么做?GoogleAPI.setHttpReferrer(/* Enter the URL of your site here */);
// See: http://code.google.co