-
Notifications
You must be signed in to change notification settings - Fork 49
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
ionic-pwa-elements (still) does not smoothly integrate with Ionic4, capacitor and angular #17
Comments
@mlynch @mhartington Can anyone help on this issue? This is broken (again!) having tried to update to the latest ionic and capacitor. Why is this not updated and tested as part of regular ionic and capacitor development? It's a recurring pain point. $ npm list @stencil/core Same sort of error again:
|
I've narrowed down the above stencil error to occurring when updating these dev dependencies to the latest versions:
|
I am in the same boat. Can't get this to integrate smoothly. |
Hey all, we're working on some changes that should permanently fix this. Stay tuned. |
This should be resolved in the 1.1.0 release that went out |
@mlynch what happened to "defineCustomElements" it seems that the loader folder was removed? |
@iaguilera14 Not sure? Also try 1.2.0 that may have fixed that |
@mlynch Thanks for the updates, I've been able to patch everything and it seems to be working well. One thing that's still an issue and might be a barrier to entry for people new to capacitor is that the docs don't really cover a good approach to installing pwa-elements if you're using a framework on top of ionic like angular. The instructions that are there (https://capacitor.ionicframework.com/docs/getting-started/pwa-elements/) don't really cover how to get these elements included in an angular/react/vue project, so I've needed stack overflow guidance to get this working: |
@mlynch I agree with @coffeymatt. The 1.2.0 release did fix the issue I was having though. |
@mlynch it seems capacitor beta.25 breaks this again. When I update I receive the TypeError: cameraModal.present is not a function error. If i revert to beta.24 it works again. |
@iaguilera14 how do you rollback to beta.24 please? |
Yep, |
My pwa-elements got updated during the latest |
Just for the record, forcing my pwa-elements version to 1.3.0 fixed the issue. Letting it upgrade to 1.4.0 creates the errors. |
thanks to @tallcoder that work for me |
Resources:
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):I'm submitting a ... (check one with "x")
[x] bug report
Current behavior:
Getting pwa-elements working in an out-of-the-box ionic4/angular/capacitor application today is very difficult and buggy.
If you follow the documented installation instructions (https://capacitor.ionicframework.com/docs/getting-started/pwa-elements/), the first suggestion of including a script in your applications index file means that the app won't work offline.
The second suggestion of using an import (some where) just breaks an ionic4/angular app, it won't build.
Using an involved work around:
https://stackoverflow.com/questions/54589782/how-to-include-ionic-pwa-elements-in-an-ionic4-angular-build
I can get it to run and now the capacitor camera works inside my PWA, but other Ionic elements are broken e.g. modals.
If I try patching Ionic and capacitor to the latest versions at this stage, ionic/angular from 4.0.2 to 4.1.1 and capacitor to beta.18, pwa-elements just breaks again.
Expected behavior:
Ionic4 with angular and capacitor should just work 'out of the box'. There needs to be clear instructions on how to include pwa-elements in angular, or integrate it tidily into the '@ionic/angular' package itself so there's no extra step.
Steps to reproduce:
Start an Ionic 4 application with angular and capacitor and try and use the capacitor camera plug in. Try and include pwa-elements without a online script reference.
Other information:
https://stackoverflow.com/questions/54589782/how-to-include-ionic-pwa-elements-in-an-ionic4-angular-build
jcesarmobile/capacitor-angular-camera-sample#1
ionic-team/capacitor#658
https://forum.getcapacitor.com/t/how-to-include-ionic-pwa-elements-in-an-ionic4-angular-build/274
The text was updated successfully, but these errors were encountered: