如何让package.json不在heroku应用程序的顶层

时间:2014-12-17 06:07:25

标签: heroku buildpack

我有这个应用程序部署到heroku:

https://github.com/justin808/react-webpack-rails-tutorial

http://react-webpack-rails-tutorial.herokuapp.com/

此处描述了该技术:http://www.railsonmaui.com/blog/2014/10/02/integrating-webpack-and-the-es6-transpiler-into-an-existing-rails-project/

目前,package.json位于项目的根级别。

如何将/package.json和/ node_modules移动到/ webpack目录中?

即,如何告诉节点buildpack在哪里查找package.json?

1 个答案:

答案 0 :(得分:3)

修复是在package.json中使用它:

  "scripts": {
    "postinstall": "cd client && npm install",

您可以在此处查看完整的详细信息:https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/package.json#L10