SAP/ui5-tooling

Shims not bundled if installed under npm alias for v3

dfenerski opened this issue · 2 comments

Expected Behavior

Automatic dependency analysis should be able to pick up exposed name of npm dependency, regardless of the underlying package.

Current Behavior

If one runs npm i kool@npm:case and then provides shim configuration for kool, the tooling won't pick it up.

Steps to Reproduce the Issue

  1. open npm sample app
  2. install a npm package under alias, reference
  3. provide a basic shimming config like this one
    image

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.0.5
  • Node.js Version: 16.19.1
  • npm Version: 8.19.3
  • OS/Platform: Win11
  • Browser (if relevant): not relevant
  • Other information regarding your environment (optional): nothing

Log Output / Stack Trace

I can provide additional log traces / info if needed.

Thanks for reaching out, @dfenerski

Indeed npm aliases are not bundled when building.

Would need to further look into this case with the team as we handle modules by path & id, so when the path is the same, the "redundant" module gets skipped. Here's the implementation: https://github.com/SAP/ui5-project/blob/main/lib/graph/projectGraphBuilder.js#L163

If you run the build with a --verbose flag, you'd get a meaningful message.

HI @dfenerski,

The issue has been resolved in @ui5/project v3.3.0 and is available through the @ui5/cli version 3.1.2

Cheers