const { defineConfig } = require('@vue/cli-service')
const webpackConfig = require('./webpack.config');

module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack: webpackConfig.chainWebpack,
  devServer: {
    allowedHosts: 'all',
    proxy: {
      '/api': {
        target: 'http://localhost:3000/',
        ws: true,
        changeOrigin: true,
        /* pathRewrite: {
          '^/api': '/'
        } */
      },
    },
    client: {
      overlay: false,
      webSocketURL: 'auto://127.0.0.1:8080/ws'
    }

  }
})
