const { defineConfig } = require('@vue/cli-service') const { DefinePlugin } = require('webpack') const { execSync } = require('child_process') const commitInfo = execSync('git show -s --format=%cs(%h)').toString().trim() module.exports = defineConfig({ publicPath: './', transpileDependencies: true, productionSourceMap: false, configureWebpack: { plugins: [ new DefinePlugin({ 'process.env.VERSION': `'${commitInfo}'` }) ] }, devServer: { port: 8080, proxy: { '^/api': { // target: 'http://localhost:3301' target: 'https://www.colorfulsweet.site', changeOrigin: true } } } })