繁体   English   中英

jspm在heroku服务器上安装

[英]jspm install on heroku server

我刚刚将我的应用程序部署到了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"
  }

您无需在heroku上提交jspm软件包。 对于生产运行:

jspm bundle-sfx lib/main

并将脚本替换为:

<script src="build.js"></script>

(或捆绑的javascript文件在哪里)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM