@liujitcn/kratos-taro-app-core 0.0.42 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,3 +39,5 @@ pnpm --filter @liujitcn/kratos-taro-app-core tsc
39
39
  pnpm test
40
40
  pnpm check:exports
41
41
  ```
42
+
43
+ 构建产物按模式与平台隔离:开发使用 `dist/dev/h5`、`dist/dev/mp-weixin`,生产默认使用 `dist/build/h5`、`dist/build/mp-weixin`。`KRATOS_TARO_OUTPUT_ROOT` 可覆盖默认目录;仓库宿主及 Kratos 配套项目的 H5 生产构建输出到 `backend/data/taro-app`。微信开发者工具默认指向开发目录,发布时导入生产目录。
package/dist/runner.mjs CHANGED
@@ -84,7 +84,7 @@ async function main() {
84
84
  env: {
85
85
  ...process.env,
86
86
  NODE_ENV: options.mode === "development" ? "development" : "production",
87
- KRATOS_TARO_OUTPUT_ROOT: process.env.KRATOS_TARO_OUTPUT_ROOT || (options.type === "h5" ? "dist/h5" : "dist/mp-weixin")
87
+ KRATOS_TARO_OUTPUT_ROOT: process.env.KRATOS_TARO_OUTPUT_ROOT || `dist/${options.mode === "development" ? "dev" : "build"}/${options.type === "h5" ? "h5" : "mp-weixin"}`
88
88
  },
89
89
  stdio: "inherit"
90
90
  });
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "type": "git",
8
8
  "url": "git@github.com:liujitcn/kratos-admin.git"
9
9
  },
10
- "version": "0.0.42",
10
+ "version": "0.0.43",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
package/src/runner.ts CHANGED
@@ -128,7 +128,7 @@ async function main(): Promise<void> {
128
128
  NODE_ENV: options.mode === 'development' ? 'development' : 'production',
129
129
  KRATOS_TARO_OUTPUT_ROOT:
130
130
  process.env.KRATOS_TARO_OUTPUT_ROOT ||
131
- (options.type === 'h5' ? 'dist/h5' : 'dist/mp-weixin'),
131
+ `dist/${options.mode === 'development' ? 'dev' : 'build'}/${options.type === 'h5' ? 'h5' : 'mp-weixin'}`,
132
132
  },
133
133
  stdio: 'inherit',
134
134
  })