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

Msal for angular has enormous bundle size #6290

Closed
markostojkov opened this issue Aug 7, 2023 · 5 comments
Closed

Msal for angular has enormous bundle size #6290

markostojkov opened this issue Aug 7, 2023 · 5 comments
Assignees
Labels
msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@markostojkov
Copy link

Core Library

MSAL.js (@azure/msal-browser)

Core Library Version

13.2.0

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

2.5.9

Public or Confidential Client?

Public

Description

image

The size of the msal bundle is 30% of my whole app (350KB+)

MSAL Configuration

No response

Relevant Code Snippets

No response

Identity Provider

Azure AD / MSA

Source

External (Customer)

@markostojkov markostojkov added the question Customer is asking for a clarification, use case or information. label Aug 7, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 7, 2023
@github-actions github-actions bot added msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Aug 7, 2023
@hectormmg hectormmg assigned jo-arroyo and unassigned hectormmg Aug 7, 2023
@jo-arroyo
Copy link
Collaborator

@markostojkov We have been working on reducing the bundle size for the next version of MSAL. Can you please try upgrading to the beta versions of MSAL Browser and MSAL Angular and see if that helps?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 8, 2023
@markostojkov
Copy link
Author

@jo-arroyo You are very generous with your time, thanks for the quick response.

I installed
"@azure/msal-angular": "^3.0.0-beta.1",
"@azure/msal-browser": "^3.0.0-beta.1",
Cleaned up my node_modules and reinstalled all
Build with source maps and I still get 320KB
Is there anything else that I am supposed to do?

Here is a tree of the @Azure folder in node modules https://pastebin.com/QH2Lh9aK
Here is my sourcemap
image

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Aug 9, 2023
@jo-arroyo
Copy link
Collaborator

jo-arroyo commented Aug 9, 2023

@markostojkov Thank you for providing the breakdown. We have made changes to the library in this version that impacted our ability to reduce the size, and unfortunately, this is the extent of the reduction we are able to make. We are aware that this is a frustration to our customers, but we do not have further work prioritized in this regard at this time.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Aug 9, 2023
@markostojkov
Copy link
Author

markostojkov commented Aug 10, 2023

@jo-arroyo I am no expert in angular, I am curious whether I am allowed as person not belonging to your organization to make a pull request and try reducing the size?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 Awaiting response from the MSAL.js team and removed Needs: Author Feedback Awaiting response from issue author labels Aug 10, 2023
@jo-arroyo
Copy link
Collaborator

@markostojkov We welcome your contributions, and would be more than happy to look at a PR. Please see this guide on how to get set up.

Closing this issue as there is no further guidance. We look forward to seeing your PR.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Attention 👋 Awaiting response from the MSAL.js team label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
Development

No branches or pull requests

3 participants