const path = require('path')
const baseUrl = '/admin'

const frameSrc = path.resolve(__dirname)
module.exports = {
  publicPath: baseUrl,
  productionSourceMap: false,
  configureWebpack: {
    resolve: {
      alias: {
        '@frame': frameSrc,
        '@naf': path.join(frameSrc, '/naf'),
        '@lib': path.join(frameSrc, '/lib')
      }
    }
  },
  devServer: {
    port: 4000,
    proxy: {
      '/api/': {
        target: 'http://localhost:18099'
        // target: 'https://jjzh.cc-lotus.info'
      },
      '/public/': {
        target: 'http://localhost:18099'
      },
      '/files/images/': {
        target: 'http://jjzh.cc-lotus.info'
      }
    }
  }
}