-
Notifications
You must be signed in to change notification settings - Fork 613
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
Lazy Loading TextZoom Plugin even if not required (Browser) #717
Comments
Can you provide a sample app with a plugin where it works and another one where it doesn't work? Might be possible that as the plugin doesn't have a web implementation but it has a ios js implementation it always loads the ios implementation even if not using it on that platform. In that case it would be a bug in @capacitor/core. As workaround you can import the plugin right where you want to use it so it's not imported on web, something like
|
@jcesarmobile i think you are 100% right. here is an example. just run npm i; npm start |
Hello joeldhenry, The repository only has a README.md and no code, maybe you forgot to push latest changes? |
ha! rookie error @jcesarmobile try now :D |
Thanks for the example, but I had already reproduced that part. Nevermind, I installed Device plugin and could reproduce |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out. |
Bug Report
In order to avoid unnecessary bundle size increase, we are blocking capacitor from our webapp, and only using features on mobile (ios & android) all other plugins are not loaded if they are blocked by this setup, except text-zoom.
the file loaded is
Plugin(s)
TextZoom
Capacitor Version
Platform(s)
Browser (Chrome)
Current Behavior
loads node_modules_capacitor_text-zoom_dist_esm_ios_js.js even though not used
Expected Behavior
not loading node_modules_capacitor_text-zoom_dist_esm_ios_js.js unnecessarily
Code Reproduction
The text was updated successfully, but these errors were encountered: