-
Notifications
You must be signed in to change notification settings - Fork 285
fix: jmapp demo build #3146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: jmapp demo build #3146
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat_v3.x #3146 +/- ##
=============================================
+ Coverage 87.18% 87.19% +0.01%
=============================================
Files 279 279
Lines 18537 18537
Branches 2820 2820
=============================================
+ Hits 16161 16163 +2
+ Misses 2371 2369 -2
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Walkthrough本次提交对多个文件进行了修改。在 Changes
Sequence Diagram(s)sequenceDiagram
participant User as 用户
participant NPM as npm
participant Vite as Vite
participant Config as vite.config.demo.ts
User->>NPM: 执行 "build:demo:jmapp" 脚本
NPM->>NPM: 运行 "npm run checked"
NPM->>Vite: 执行 "vite build --config vite.config.demo.ts"
Vite->>Config: 加载配置文件
Config-->>Vite: 返回配置,设置 base 为 /h5/react/jdesign-3x (若 projectID = "jmapp")
Vite-->>NPM: 完成构建过程
Possibly related PRs
Suggested Reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
packages/nutui-taro-demo/config/prod.jsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "taro/react" to extend from. Please check that the name of the config is correct. The config "taro/react" was referenced from the config file in "/packages/nutui-taro-demo/.eslintrc". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
package.json(1 hunks)vite.config.demo.ts(1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
vite.config.demo.ts (1)
packages/nutui-taro-demo/config/index.js (1)
projectID(5-5)
🔇 Additional comments (1)
package.json (1)
73-73:✅ Verification successful
指定构建配置文件以确保正确的 jmapp 演示构建
此更改为
build:demo:jmapp脚本添加了--config vite.config.demo.ts参数,确保在构建 jmapp 演示项目时使用正确的配置文件,这与其他演示构建脚本保持一致(如第 72 行的build:demo脚本)。
🏁 Script executed:
#!/bin/bash # 验证其他相关构建脚本是否也指定了配置文件 echo "检查其他相关的 demo 构建脚本配置..." grep "build:demo" package.json # 检查是否有其他使用 vite.config.demo.ts 的构建脚本 echo "使用 vite.config.demo.ts 的构建脚本:" grep -n "vite.config.demo.ts" package.jsonLength of output: 587
构建配置文件已正确指定,确保 jmapp 演示构建使用正确配置
经过验证,
build:demo:jmapp脚本中添加的--config vite.config.demo.ts参数以及环境变量VITE_APP_PROJECT_ID=jmapp的设置,与其他 demo 构建脚本(如第 72 行的build:demo)保持一致,均使用了相同的配置文件。这保证了各个演示构建的一致性和正确性。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加 taro 的构建,2.x 版本只构建了 taro 版本。
将文件的部署处理增加到 work-shell 工程里面,每次发版执行 work-shell 脚本部署 demo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taro 下的 offical-theme-react.md 文件也需要修改
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
package.json (2)
80-80: Taro Demo 构建命令更新
在"build:taro:demo:jmapp"命令中,将原来的build:h5修改为build:jmapp h5,确保生成页面文件与 jmapp 构建流程一致。建议进一步验证生成页面的输出是否符合新配置。
81-81: JDTaro 构建命令更新
在"build:jdtaro:demo:jmapp"命令中,新增了JD=1参数并使用build:jmapp h5命令,请确认 JD=1 的作用在整个构建流程中得到正确处理,同时确保该命令能正确生成 JDTaro 的 jmapp demo 版本。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: test
🔇 Additional comments (1)
package.json (1)
74-74: 构建命令更新正确
该命令在"build:demo:jmapp"中新增了--config vite.config.demo.ts参数,同时正确地设置了环境变量VITE_APP_PROJECT_ID=jmapp,满足 jmapp demo 构建需求。请确保vite.config.demo.ts中的配置与预期一致。

🤔 这个变动的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
☑️ 请求合并前的自查清单
Summary by CodeRabbit