【发布时间】:2022-01-11 22:02:26
【问题描述】:
使用 react-rails gem 创建了一个 react rails 应用程序,但是当上传到 heroku 时,react 组件都丢失了。不过,它在我的本地服务器上运行良好。这是 package.json 文件,以防我错过任何东西。任何帮助将不胜感激!
{
"name": "my_app",
"private": true,
"dependencies": {
"@babel/preset-react": "^7.7.4",
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "^4.2.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"bootstrap": "^4.4.1",
"jquery": "^3.4.1",
"popper.js": "^1.16.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-bootstrap": "^1.0.0-beta.16",
"react-dom": "^16.12.0",
"react-redux": "^7.1.3",
"react-router-dom": "^5.1.2",
"react_ujs": "^2.6.0",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"turbolinks": "^5.2.0"
},
"version": "0.1.0",
"devDependencies": {
"@types/react-redux": "^7.1.6",
"webpack-dev-server": "^3.9.0"
}
}
【问题讨论】:
-
您的浏览器控制台有错误吗?
-
@morissetcl nope 控制台上的一切似乎都很好,但 bootstrap/react/redux 组件没有出现
标签: ruby-on-rails reactjs heroku