How to run Vue.js dev serve with https?

后端 未结 7 997
孤独总比滥情好
孤独总比滥情好 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 17:56

    You will still get the warning when running in Chrome or Edge, as the certificate is not a trusted certificate. But you can switch off the prompt when running the site by setting the following flag:

    chrome://flags/#allow-insecure-localhost
    

    This also works also in the latest version Edge.

提交回复
热议问题