- 修改 TARO_POSTER_DOMAIN 环境变量,移除 H5 环境特殊处理逻辑 - 在 PurchasePreview 组件中新增“空磅”与“总磅”字段展示 - Weigh 组件中增加表单验证状态的日志输出 - 更新应用版本号从 v0.0.24 到 v0.0.25 - delivery 页面引入 PdfTemplate 并替换原有 Template 类 - create 页面调整 setActive 调用位置并在订单创建流程中设置默认值 - preview 页面将按钮文案由“编辑”改为“上一步” - audit result 页面文案从“审核”统一为“审批” - 重构 SupplierWeightCalculator 计算逻辑,修正额外纸箱重量使用字段 - 修复 PurchaseOrderCalculator 中利润计算公式的运算顺序错误 - 移除部分无用 console 日志,保留关键调试信息
61 lines
1.8 KiB
TypeScript
61 lines
1.8 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": '"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;
|