const {
  defineConfig
} = require('@vue/cli-service')
const Timestamp = new Date().getTime();
module.exports = defineConfig({
  devServer: {
    open: true,
    proxy: {
      '/api': {
        target: 'http://121.40.214.80:81/', // 对应自己的接口
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': '',
        },
      },
    },
  },
  configureWebpack: { // webpack 配置
    output: { // 输出重构  打包编译后的 文件名称  【模块名称.版本号.时间戳】
      filename: `js/[name].${Timestamp}.js`,
      chunkFilename: `js/[name].${Timestamp}.js`
    }
  },
  css: {
    extract: {
      filename: `css/[name].${Timestamp}.css`,
      chunkFilename: `css/[name].${Timestamp}.css`
    }
  },
  productionSourceMap: false,
  publicPath: './',
  transpileDependencies: true

})