Search code examples
typescriptvue.jswebpackbabeljsvue-cli-3

Disable https in vue cli production build


I have a vue project created from vue-cli

I am consuming my API that is not secured at the moment so I must use http.

The problem is when I do yarn build vue(or babel, typescript or webpack) replaces all of my http endpoints with https

My question: How to force HTTP in production build?

Thank you


Solution

  • I was so focused on finding the problem that I didn't realise I was the problem.

    In my configuration of the Axios I set HTTPS if NODE_ENV=production

    and so I was always building with HTTPS instead of HTTP