我刚刚将我的应用程序部署到Heroku但是当我在浏览器中运行它时,网络告诉我它找不到生活在jspm_packages / system.js中的system.js文件
该应用程序在本地工作正常,所以我认为heroku不安装jspm?我是否需要为Heroku添加脚本?
这是我的package.json中的jspm设置
"jspm": {
"directories": {
"baseURL": "www"
},
"dependencies": {
"google-maps-api": "npm:google-maps-api@^1.1.0",
"react": "npm:react@^0.14.2",
"react-dom": "npm:react-dom@^0.14.2"
},
"devDependencies": {
"babel": "npm:babel-core@^5.8.24",
"babel-runtime": "npm:babel-runtime@^5.8.24",
"core-js": "npm:core-js@^1.1.4"
}
},
"devDependencies": {
"babel-eslint": "^4.1.3",
"eslint-plugin-react": "^3.5.1",
"jspm": "^0.16.14"
}
答案 0 :(得分:2)
您无需在heroku上提交jspm软件包。对于生产运行:
jspm bundle-sfx lib/main
并将您的脚本替换为:
<script src="build.js"></script>
(或您的捆绑javascript文件在哪里)