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

sap libraries in bundle #841

Closed
hauseyo opened this issue Jun 29, 2023 · 6 comments
Closed

sap libraries in bundle #841

hauseyo opened this issue Jun 29, 2023 · 6 comments
Labels
bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate

Comments

@hauseyo
Copy link

hauseyo commented Jun 29, 2023

Hi,
I upgraded ui5 tooling from v2 to v3 and the issue is that sap libraries are included in the final bundle, which is bad in my case because it becomes too heavy. It leads to failed deployment to CF space due to the size of the bundle.
Build result

Expected Behavior

Not having sap libraries in bundle

Current Behavior

Having sap libraries in bundle

Steps to Reproduce the Issue

  1. run ui5 build --a --config ui5-deploy.yaml
  2. check the dist folder

Context

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

Log Output / Stack Trace

Everything works fine
@hauseyo hauseyo added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jun 29, 2023
@RandomByte
Copy link
Member

RandomByte commented Jun 29, 2023

Are you referring to a specific bundle or all the files in the build result?

If you remove the -a flag from your command and after clearing the dist directory, does the result match better with your expectation?

@hauseyo
Copy link
Author

hauseyo commented Jun 29, 2023

Are you referring to a specific bundle or all the files in the build result?

If you remove the -a flag from your command and after clearing the dist directory, does the result match better with your expectation?

Hi,
Without --a flag there is no resources folder and jQuery files, which is expectable.
But let me be more specific: --a flag is needed because in the project we use 3rd party library, which should be in the final build result. Without it, it will not be included, so we have to use --a flag or find any other way to solve the mentioned issue.

@RandomByte
Copy link
Member

I see. In that case, try using the --include-dependency yourlib parameter instead: https://sap.github.io/ui5-tooling/v3/pages/CLI/

@hauseyo
Copy link
Author

hauseyo commented Jun 29, 2023

I see. In that case, try using the --include-dependency yourlib parameter instead: https://sap.github.io/ui5-tooling/v3/pages/CLI/

Yes, I tried that one: ui5 build preload --include-dependency @sapit/sapui5-lib --clean-dest --config ui5-deploy.yaml
But it seems, it can't find the dependency, even though it explicitly defined in the package.json
deps in package json
Warning

@RandomByte
Copy link
Member

RandomByte commented Jun 29, 2023

You need to specify the name as defined in the library's ui5.yaml (metadata.name)

Check the output of ui5 ls

@hauseyo
Copy link
Author

hauseyo commented Jun 29, 2023

You need to specify the name as defined in the library's ui5.yaml (metadata.name)

Check the output of ui5 ls

Thank you for the hint! It worked.
I propose you to somehow document it or add some examples in the documentation.

@hauseyo hauseyo closed this as completed Jun 29, 2023
RandomByte added a commit to SAP/ui5-cli that referenced this issue Jun 30, 2023
As per feedback provided in
SAP/ui5-tooling#841 (comment),
explain that the provided dependency names must match the ui5.yaml names
and not the npm module names.
RandomByte added a commit to SAP/ui5-cli that referenced this issue Jul 3, 2023
As per feedback provided in
SAP/ui5-tooling#841 (comment),
explain that the provided dependency names must match the ui5.yaml names
and not the npm module names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate
Projects
None yet
Development

No branches or pull requests

2 participants