How to run Vue.js dev serve with https?

In the latest vuejs (as of May 7, 2018), you need to add a “vue.config.js” in the project root directory:

vue.config.js:

module.exports = {
  devServer: {
    open: process.platform === 'darwin',
    host: '0.0.0.0',
    port: 8085, // CHANGE YOUR PORT HERE!
    https: true,
    hotOnly: false,
  },
}

In this file, set the value: https: true

Leave a Comment