Skip to content
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(vite-runner): 修复Windows环境下使用vite构建时路径错误 #16971

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

IsFaser
Copy link
Contributor

@IsFaser IsFaser commented Dec 2, 2024

这个 PR 做了什么? (简要描述所做更改)

该PR在getHtmlScript中使用normalizePath处理了路径.

此Bug应在上游处理以期彻底解决此类问题, 但我对该框架不熟悉不敢轻易修改上游代码.
类似PR: #16124

bug简述

Windows 下使用 vite 构建时, 由于html代码注入了有误的路径"\app.config.ts", 导致不能被解析.

const htmlScript = getHtmlScript(scriptSource, pxtransformOption)
return html.replace(/<script><%= htmlWebpackPlugin.options.script %><\/script>/, htmlScript)

这个 PR 是什么类型? (至少选择一个)

  • 错误修复(Bugfix) issue: #16314
  • 新功能(Feature)
  • 代码重构(Refactor)
  • TypeScript 类型定义修改(Typings)
  • 文档修改(Docs)
  • 代码风格更新(Code style update)
  • 其他,请描述(Other, please describe):

这个 PR 涉及以下平台:

  • 所有小程序
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • QQ 轻应用
  • 京东小程序
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)
  • 鸿蒙(harmony)

@tutuxxx tutuxxx self-requested a review December 2, 2024 07:59
@tutuxxx tutuxxx added this to the 4.0.8 milestone Dec 2, 2024
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.52%. Comparing base (0828d8d) to head (fa62202).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main   #16971    +/-   ##
========================================
  Coverage   58.52%   58.52%            
========================================
  Files         466      466            
  Lines       27102    27102            
  Branches     5722     5898   +176     
========================================
  Hits        15861    15861            
+ Misses       9765     9740    -25     
- Partials     1476     1501    +25     
Flag Coverage Δ
taro-cli 73.67% <ø> (ø)
taro-runtime 59.87% <ø> (ø)
taro-web 52.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 11 files with indirect coverage changes

@tutuxxx tutuxxx merged commit 14ac834 into NervJS:main Dec 2, 2024
23 checks passed
@IsFaser IsFaser deleted the fix/h5-build branch December 2, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants