我的rails应用程序中有反应和引导,并且迄今为止他们独立工作的很好。我想通过使用react-bootstrap来组合功能。我正在学习本教程以使其工作:http://react-bootstrap.github.io/getting-started.html。在rails中获取react-bootstrap工作
我做了CommonJS部分。我在那里做的:
npm install react
npm install react-bootstrap
在终端中。
然后我去了我的application.js我的资产中的文件,并添加以下代码: Var Alert = require('react-bootstrap').Alert;
在该线路上的控制台错误以及它说Uncaught ReferenceError: require is not definedapplication.js?body=1:28 (anonymous function)
我该如何要求工作?