fix: 解决合并冲突并同步配置文件
- 解决环境配置文件冲突(.env.development, .env.production, .env.test) - 更新项目配置文件(project.config.json) - 添加新的配置文件(project.tt.json) - 同步config/index.ts配置更改
This commit is contained in:
commit
a27577dd3c
|
|
@ -1,2 +1,4 @@
|
||||||
# TARO_APP_ID=ttbfd9c96420ec8f8201
|
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
||||||
TARO_APP_ID=wxb51f0b0c3aad7cdf
|
# TARO_APP_ID="开发环境下的小程序 AppID"
|
||||||
|
TARO_APP_ID_WEAPP=wxb51f0b0c3aad7cdf
|
||||||
|
TARO_APP_ID_TT=ttbfd9c96420ec8f8201
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,4 @@
|
||||||
# TARO_APP_ID=ttbfd9c96420ec8f8201
|
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
||||||
TARO_APP_ID=wxb51f0b0c3aad7cdf
|
# TARO_APP_ID="开发环境下的小程序 AppID"
|
||||||
|
TARO_APP_ID_WEAPP=wxb51f0b0c3aad7cdf
|
||||||
|
TARO_APP_ID_TT=ttbfd9c96420ec8f8201
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,4 @@
|
||||||
# TARO_APP_ID=ttbfd9c96420ec8f8201
|
# 配置文档参考 https://taro-docs.jd.com/docs/next/env-mode-config
|
||||||
TARO_APP_ID=wxb51f0b0c3aad7cdf
|
# TARO_APP_ID="开发环境下的小程序 AppID"
|
||||||
|
TARO_APP_ID_WEAPP=wxb51f0b0c3aad7cdf
|
||||||
|
TARO_APP_ID_TT=ttbfd9c96420ec8f8201
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,16 @@ import prodConfig from './prod'
|
||||||
|
|
||||||
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
|
||||||
export default defineConfig<'vite'>(async (merge) => {
|
export default defineConfig<'vite'>(async (merge) => {
|
||||||
|
// 不同平台的 appId 配置
|
||||||
|
const appIds = {
|
||||||
|
weapp: process.env.TARO_APP_ID_WEAPP || 'your-weapp-appid',
|
||||||
|
tt: process.env.TARO_APP_ID_TT || 'your-tt-appid',
|
||||||
|
alipay: process.env.TARO_APP_ID_ALIPAY || 'your-alipay-appid',
|
||||||
|
swan: process.env.TARO_APP_ID_SWAN || 'your-swan-appid',
|
||||||
|
qq: process.env.TARO_APP_ID_QQ || 'your-qq-appid',
|
||||||
|
jd: process.env.TARO_APP_ID_JD || 'your-jd-appid'
|
||||||
|
}
|
||||||
|
|
||||||
const baseConfig: UserConfigExport<'vite'> = {
|
const baseConfig: UserConfigExport<'vite'> = {
|
||||||
projectName: 'bw-mini-app',
|
projectName: 'bw-mini-app',
|
||||||
date: '2025-9-1',
|
date: '2025-9-1',
|
||||||
|
|
@ -16,7 +26,7 @@ export default defineConfig<'vite'>(async (merge) => {
|
||||||
828: 1.81 / 2
|
828: 1.81 / 2
|
||||||
},
|
},
|
||||||
sourceRoot: 'src',
|
sourceRoot: 'src',
|
||||||
outputRoot: 'dist',
|
outputRoot: process.env.TARO_ENV ? `dist/${process.env.TARO_ENV}` : 'dist',
|
||||||
plugins: [
|
plugins: [
|
||||||
"@tarojs/plugin-generator"
|
"@tarojs/plugin-generator"
|
||||||
],
|
],
|
||||||
|
|
@ -47,6 +57,31 @@ export default defineConfig<'vite'>(async (merge) => {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// 小程序平台特定配置
|
||||||
|
weapp: {
|
||||||
|
outputRoot: 'dist/weapp',
|
||||||
|
appId: appIds.weapp
|
||||||
|
},
|
||||||
|
tt: {
|
||||||
|
outputRoot: 'dist/tt',
|
||||||
|
appId: appIds.tt
|
||||||
|
},
|
||||||
|
alipay: {
|
||||||
|
outputRoot: 'dist/alipay',
|
||||||
|
appId: appIds.alipay
|
||||||
|
},
|
||||||
|
swan: {
|
||||||
|
outputRoot: 'dist/swan',
|
||||||
|
appId: appIds.swan
|
||||||
|
},
|
||||||
|
qq: {
|
||||||
|
outputRoot: 'dist/qq',
|
||||||
|
appId: appIds.qq
|
||||||
|
},
|
||||||
|
jd: {
|
||||||
|
outputRoot: 'dist/jd',
|
||||||
|
appId: appIds.jd
|
||||||
|
},
|
||||||
h5: {
|
h5: {
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
staticDirectory: 'static',
|
staticDirectory: 'static',
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,15 @@
|
||||||
{
|
{
|
||||||
"miniprogramRoot": "dist/",
|
"miniprogramRoot": "./dist/weapp",
|
||||||
"projectname": "bw-mini-app",
|
"projectname": "bw-mini-app",
|
||||||
"description": "图生图 风格转换 ",
|
"description": "图生图 风格转换 ",
|
||||||
"appid": "wxb51f0b0c3aad7cdf",
|
"appid": "wxb51f0b0c3aad7cdf",
|
||||||
"setting": {
|
"setting": {
|
||||||
"urlCheck": true,
|
"urlCheck": true,
|
||||||
"es6": true,
|
"es6": true,
|
||||||
"enhance": true,
|
"enhance": false,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"postcss": false,
|
"postcss": false,
|
||||||
"minified": true,
|
"minified": false
|
||||||
"compileWorklet": false,
|
|
||||||
"uglifyFileName": false,
|
|
||||||
"uploadWithSourceMap": true,
|
|
||||||
"packNpmManually": false,
|
|
||||||
"packNpmRelationList": [],
|
|
||||||
"minifyWXSS": true,
|
|
||||||
"minifyWXML": true,
|
|
||||||
"localPlugins": false,
|
|
||||||
"disableUseStrict": false,
|
|
||||||
"useCompilerPlugins": false,
|
|
||||||
"condition": false,
|
|
||||||
"swc": false,
|
|
||||||
"disableSWC": true,
|
|
||||||
"babelSetting": {
|
|
||||||
"ignore": [],
|
|
||||||
"disablePlugins": [],
|
|
||||||
"outputPath": ""
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram"
|
||||||
"simulatorPluginLibVersion": {},
|
|
||||||
"packOptions": {
|
|
||||||
"ignore": [],
|
|
||||||
"include": []
|
|
||||||
},
|
|
||||||
"editorSetting": {}
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"miniprogramRoot": "./dist/tt",
|
||||||
|
"projectname": "bw-mini-app",
|
||||||
|
"appid": "ttbfd9c96420ec8f8201"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue