- 调整API域名配置,区分h5和小程序环境 - 重构OrderCost组件,支持多种费用类型筛选和展示 - 优化OrderVehicle组件,简化经销商信息赋值逻辑 - Weigh组件新增西瓜品种选择功能,包含弹窗和校验逻辑 - 重写LaborInfoSection组件,支持新增和编辑人工费用项 - 改进费用承担方和工头信息的处理流程 - 优化UI布局和交互体验
60 lines
1.8 KiB
TypeScript
60 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"',
|
|
},
|
|
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;
|