Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Load Masq lib in separate chunk (fixes IE11) #165

Merged
merged 3 commits into from
Apr 8, 2019
Merged

Conversation

amatissart
Copy link
Contributor

Masq lib bundle is not compatible with IE11.
With these changes, the Masq lib is loaded dynamically, so that webpack builds a separate chunk that will be used only if Masq integration is enabled.

This also reduces the default bundle size (from 160KB to 60KB gzipped).

In the future, it would probably be useful to ensure Masq keeps disabled on incompatible browsers, such as IE11.

@amatissart amatissart changed the title Load masq lib in separate chunk (fixes IE11) Load Masq lib in separate chunk (fixes IE11) Apr 4, 2019
Copy link

@Julien-laville Julien-laville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move your init code to masq lib ?

@amatissart
Copy link
Contributor Author

This way is much cleaner indeed !

@sujeebant
Copy link
Contributor

The function isLoggedIn has been written to be synchronous, the dynamic loading of Masq makes every function of masq asynchronous, some changes are needed to make this work.

Copy link
Contributor

@sujeebant sujeebant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes needed to make isLoggedIn function will be added to the PR #164

@amatissart amatissart merged commit a519387 into master Apr 8, 2019
@amatissart amatissart deleted the masq-chunk branch April 16, 2019 12:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants