Failure to serve local transpiled TypeScript library files correctly using workspace configuration

未关闭
#996 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
build-system, cli

调研方向

Start by reproducing the workspace configuration from the listed steps with a TypeScript UI5 app and library, then run ui5 serve and inspect logoutput.txt. Trace how the app descriptor's library dependency is mapped to the library's dist/resources path. Done means the local library.js is served without copying it into src/.

由索引模型根据 Issue 内容生成。

描述

module/ui5-server

Expected Behavior

When adding a local TypeScript UI5 library to my UI5 app descriptor and using the UI5 Tooling workspace configuration, the UI5 Tooling should recognize the library as being implemented in TypeScript and serve the transpiled files via the webserver when running the app using ui5 serve.

Current Behavior

While using ui5 serve the UI5 app tries to fetch the library.js file, resulting in an error failed to load 'mylibrary/library.js' from resources/mylibrary/library.js: script load error
Copying the the transpiled file from dist/resources/mylibrary/library.js to src/ results in the browser being able to load this specific file.

Steps to Reproduce the Issue

  1. Create a TypeScript UI5 app using yo easy-ui5
  2. Create a TypeScript UI5 library using yo easy-ui5
  3. Set up the workspace configuration as described in UI5 Tooling documentation UI5 Tooling - Development Overview
  4. Add the local library in the app descriptor under sap.ui5 > dependencies > libs
  5. Run ui5 serve in app directory
  6. The browser console will show an error when trying to retrieve library.js

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 4.0.0
  • Node.js Version: 20.11.0
  • npm Version: 10.2.4
  • OS/Platform: macOS Sonoma 14.5
  • Browser (if relevant): unknown
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

logoutput.txt

主要语言
JavaScript
星标
510
派生
80
平均合并
2 天 22 小时
30 天内合并 PR
12

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

UI5/cli 的其他 Issue

查看 UI5/cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。