@lark-apaas/coding-template-vite-react 0.1.9 → 0.1.11

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.
@@ -2,6 +2,7 @@
2
2
  "name": "miaoda-vite-react-app",
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "dev": "node scripts/dev.mjs",
7
8
  "build": "bash scripts/build.sh",
@@ -73,7 +74,7 @@
73
74
  "@types/react": "^19",
74
75
  "@types/react-dom": "^19",
75
76
  "@lark-apaas/coding-presets": "1.0.3-alpha.0",
76
- "@lark-apaas/coding-vite-preset": "1.0.7-alpha.24",
77
+ "@lark-apaas/coding-preset-vite-react": "^0.1.3",
77
78
  "concurrently": "^9",
78
79
  "eslint": "^9",
79
80
  "eslint-plugin-react-hooks": "^7",
@@ -12,6 +12,7 @@ OUTPUT_STATIC="$ROOT/dist/output_static"
12
12
  # CLI 注入约定见 miaoda-cli src/services/deploy/modern/atoms/build.ts
13
13
  export CLIENT_BASE_PATH="${MIAODA_APP_ID:+/app/$MIAODA_APP_ID}"
14
14
  export ASSETS_CDN_PATH="${MIAODA_RESOURCE_CDN_PREFIX:-/}"
15
+ export STATIC_ASSETS_BASE_URL="${MIAODA_STATIC_CDN_PREFIX}"
15
16
  export NODE_ENV="${NODE_ENV:-production}"
16
17
 
17
18
  # 清理
@@ -22,10 +23,7 @@ npx vite build --outDir "$ROOT/dist/client" --emptyOutDir
22
23
 
23
24
  # 2. HTML → dist/output/
24
25
  mkdir -p "$OUTPUT"
25
- find "$ROOT/dist/client" -maxdepth 1 -name '*.html' -exec cp {} "$OUTPUT/" \;
26
-
27
- # 生成 routes.json
28
- echo '{ "version": 1, "type": "vite-react", "fallback": "index.html" }' > "$OUTPUT/routes.json"
26
+ find "$ROOT/dist/client" -maxdepth 1 \( -name '*.html' -o -name 'routes.json' \) -exec cp {} "$OUTPUT/" \;
29
27
 
30
28
  # 3. assets/ → dist/output_resource/(JS/CSS/字体,上传到 CDN)
31
29
  if [ -d "$ROOT/dist/client/assets" ]; then
@@ -1,5 +1,5 @@
1
1
  import path from 'path'
2
- import { defineConfig } from '@lark-apaas/coding-vite-preset'
2
+ import { defineConfig } from '@lark-apaas/coding-preset-vite-react'
3
3
 
4
4
  export default defineConfig({
5
5
  resolve: {