Files
huangjingfen/pro_v3.5.1/view/uniapp/vue.config.js
apple 6e5bbee71d feat(hjf): 公排入队可配置,默认关闭时同步发放积分奖励
- 新增 hjf_queue_pool_enable(迁移 SQL),后台公排配置读写统一为该键
- Pay 监听:关闭公排时同步执行等级检查与 PointsRewardServices::reward,开启时仍派发 HjfOrderPayJob
- PointsRewardServices: bcInc 增量传 string,避免 PHP 类型错误
- hjf:patch-rewards 补偿命令补充等级检查与正确的幂等条件
- uniapp vue.config.js 本地 API 代理调整(H5 开发)
- docs/issues-0323-1 更新

Made-with: Cursor
2026-03-25 07:38:12 +08:00

57 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
module.exports = {
productionSourceMap: false, // 生产打包时不输出map文件增加打包速度
devServer: {
port: 8080,
proxy: {
'/api': {
target: 'http://127.0.0.1:20199',
changeOrigin: true
},
'/uploads': {
target: 'http://127.0.0.1:20199',
changeOrigin: true
},
'/statics': {
target: 'http://127.0.0.1:20199',
changeOrigin: true
}
}
},
chainWebpack: config => {
// 优先使用 HBuilderX 插件内的 babel 插件,若不存在则使用项目 node_modules便于命令行运行
const path = require('path')
const HX_BABEL = '/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules'
const projectRoot = path.resolve(__dirname)
let optionalChaining, nullishCoalescing
try {
optionalChaining = require.resolve('@babel/plugin-proposal-optional-chaining', { paths: [HX_BABEL] })
nullishCoalescing = require.resolve('@babel/plugin-proposal-nullish-coalescing-operator', { paths: [HX_BABEL] })
} catch (e) {
optionalChaining = require.resolve('@babel/plugin-proposal-optional-chaining', { paths: [projectRoot] })
nullishCoalescing = require.resolve('@babel/plugin-proposal-nullish-coalescing-operator', { paths: [projectRoot] })
}
if (config.module.rules.get('js')) {
config.module.rule('js').use('babel-loader').tap(options => {
options = options || {}
options.plugins = options.plugins || []
const pluginPaths = options.plugins.map(p => (Array.isArray(p) ? p[0] : p))
if (!pluginPaths.includes(optionalChaining)) {
options.plugins.push(optionalChaining)
}
if (!pluginPaths.includes(nullishCoalescing)) {
options.plugins.push(nullishCoalescing)
}
return options
})
}
},
configureWebpack: config => {
if (process.env.NODE_ENV === 'production') {
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
}
}
}