deploy vuejs heroku code example
Example 1: vue js access heroku port
const webpack = require('webpack');
module.exports = {
configureWebpack: {
plugins: [
new webpack.DefinePlugin({
'process.env': {
'PORT': JSON.stringify(process.env.PORT)
}
})
]
}
}
Example 2: deploy vuejs heroku
$ heroku create <YOUR-PROJECT-NAME-HERE>
$ heroku config:set NODE_ENV=production --app <YOUR-PROJECT-NAME-HERE>
$ yarn build # or npm run build
$ git status
$ git add && git commit -m 'Deploy to heroku'
$ git push origin master
$ git push heroku master