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

Ouverte
#996 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
typescript
Domaine
build-system, cli

Piste de recherche

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/.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
JavaScript
Étoiles
510
Forks
80
Merge moyen
2 j 22 h
PR mergées (30 j)
12

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de UI5/cli

Toutes les issues de UI5/cli

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.