如何将使用Webpack的节点部署到heroku [英] How to deploy node that uses Webpack to heroku
问题描述
另外,我不提交npm_modules文件夹和公用文件夹,其中所有生成的文件都是。我无法弄清楚如何在部署和设置我的服务器(它已经在寻找公共文件夹)之后构建我的应用程序(我有webpack build命令)。
它看起来我是一个坏主意,在上传前提交。也许有一些温和的决定......任何想法?
从以下分支:如何将使用Gulp的节点部署到heroku
heroku-postbuild:webpack -p --config ./webpack.prod.config.js --progress
这更好,因为如果你使用postinstall,每次你做 npm i
构建脚本被解雇
I'm using webpack.
Also I don't commit npm_modules folder and public folder, where all generated files are. And I can't figure out how to build my app (I have webpack build command) after deploy and setup my server (it's already looking for public folder).
It seems me a bad idea to commit before upload. Maybe there are some gentle decisions... Any thoughts?
Forked from: How to deploy node that uses Gulp to heroku
"heroku-postbuild": "webpack -p --config ./webpack.prod.config.js --progress"
this is better because if you use postinstall, everytime you do npm i
the build script get fired
这篇关于如何将使用Webpack的节点部署到heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!