ERPTurbo_Client/packages/app-client/config/prod.ts
shenyifei a69525bfb5 feat(purchase): 实现空箱费用计算和空箱信息展示功能
- 在生产环境配置中添加海报域名环境变量
- 优化经销商选择器组件样式和交互
- 引入 decimal.js 库用于精确计算空箱费用
- 实现空箱费用自动计算和固定费用项生成功能
- 添加空箱使用明细展示和分组统计功能
- 完善空箱信息编辑功能,支持销售价、成本价、箱重编辑
- 优化订单预览页面空箱信息展示逻辑
- 移除重复的费用项目获取逻辑,统一通过 props 传递
- 修复纸箱品牌过滤条件错误问题
- 优化输入框和选择器组件样式和交互体验
2025-11-18 15:16:30 +08:00

64 lines
1.9 KiB
TypeScript

import type { UserConfigExport } from "@tarojs/cli";
export default {
logger: {
quiet: false,
stats: true,
},
terser: {
config: {
warnings: false,
parse: {},
compress: {
drop_console: true,
drop_debugger: false,
pure_funcs: ["console.log"], // 移除console
},
},
},
defineConstants: {
"process.env.TARO_APP_ID": '"wxa080848726642f73"',
"process.env.TARO_API_DOMAIN":
process.env.TARO_ENV === "h5"
? '"/api"'
: '"https://api.erp.qilincloud168.com"',
"process.env.TARO_POSTER_DOMAIN":
process.env.TARO_ENV === "h5"
? '""'
: '"https://poster.qilincloud168.com"',
},
mini: {
miniCssExtractPluginOption: {
ignoreOrder: true,
},
},
h5: {
/**
* WebpackChain 插件配置
* @docs https://github.com/neutrinojs/webpack-chain
*/
// webpackChain (chain) {
// /**
// * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。
// * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer
// */
// chain.plugin('analyzer')
// .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
// /**
// * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。
// * @docs https://github.com/chrisvfritz/prerender-spa-plugin
// */
// const path = require('path')
// const Prerender = require('prerender-spa-plugin')
// const staticDir = path.join(__dirname, '..', 'dist')
// chain
// .plugin('prerender')
// .use(new Prerender({
// staticDir,
// routes: [ '/pages/index/index' ],
// postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') })
// }))
// }
},
} satisfies UserConfigExport;