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

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

Open
catbuubuu opened this issue Jul 30, 2024 · 1 comment
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module

Comments

@catbuubuu
Copy link

catbuubuu commented Jul 30, 2024

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

@catbuubuu catbuubuu added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 30, 2024
@d3xter666 d3xter666 added enhancement New feature or request module/ui5-server Related to the UI5 Server module and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 31, 2024
@d3xter666
Copy link
Contributor

d3xter666 commented Jul 31, 2024

Hi @catbuubuu ,

Thank you for your feedback!

Currently the UI5 Tooling does not provide typescript transpilation out of the box. However, there are plenty of middlewares that could be used.
You can use, for example the ui5-tooling-transpile middleware/task

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-server Related to the UI5 Server module
Projects
None yet
Development

No branches or pull requests

2 participants