begin-examples / node-vue

Basic Vue app + API (Begin / Node.js)
Apache License 2.0
1 stars 0 forks source link

proxy error using vue-cli-service serve #171

Open spencerflagg opened 4 years ago

spencerflagg commented 4 years ago

I've started a project based on this template, and I'm struggling with the devServer proxy. Here's the relevant config:

package.json

"scripts": {
    "start": "run-s build api",
    "api": "cross-env NODE_ENV=testing ARC_LOCAL=1 npx sandbox",
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "eslint src --ignore-pattern node_modules --fix"
  }

vue.config.js

devServer: {
    proxy: {
      '^/api': {
        target: 'http://localhost:3333'
      }
    }
  },

my issue

kristoferjoseph commented 4 years ago

Not sure where to file this issue because it relates to Vue cli documentation https://new-issue.vuejs.org/?repo=vuejs/vue-cli