How to run Vue.js dev serve with https?

后端 未结 7 985
孤独总比滥情好
孤独总比滥情好 2020-12-07 17:20

I\'m using Vue-cli to create vue project with webpack template. how to run it with https in development using: npm run dev?

7条回答
  •  鱼传尺愫
    2020-12-07 18:08

    Simplest way is to go into package.json and change "dev" to

     "dev": "webpack-dev-server --inline --progress  --https --config build/webpack.dev.conf.js",
    

    it will still give the message running on http://localhost in the console but you can access the site on https://localhost

提交回复
热议问题