How to deploy node that uses Gulp to heroku

后端 未结 8 1298
遥遥无期
遥遥无期 2020-12-07 16:21

I\'m using gulp and also gulp plugins like gulp-minify-css, gulp-uglify etc (that listed as npm dependencies for my application).

Also I don\'t commit npm_modules fo

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 17:19

    Heroku finds that there is a gulpfile in your project and expects there to be a heroku:production task (in the gulpfile). So all you need to do is register a task that matches that name:

    gulp.task("heroku:production", function(){
        console.log('hello'); // the task does not need to do anything.
    });
    

    This is enough for heroku to not reject your app.

提交回复
热议问题