We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running a fresh Angular 17 project, which uses Vite, and latest Capacitor. Added pwa-elements as described in the Capacitor docs https://capacitorjs.com/docs/web/pwa-elements#angular: main.ts:
pwa-elements
main.ts
import { defineCustomElements } from '@ionic/pwa-elements/loader'; defineCustomElements(window);
Running the code (ng serve) results in this warning: "The above dynamic import cannot be analyzed by Vite".
ng serve
Notably, everything does still seem to function, but the warning is a nuisance.
Hard to say if the issue is more with the stencil version that builds pwa-elements or what.
Workarounds Changing the vite config as described here #109 (comment) might potentially work, except Angular doesn't currently support configuring vite (https://angular.io/guide/esbuild#:~:text=currently%20cannot%20be%20directly%20configured).
Instead including pwa-elements via a cdn script tag in index.html does remove the warning, but doesn't work for offline scenarios.
index.html
The text was updated successfully, but these errors were encountered:
@sean-perkins I can confirm that this warning still persists with @ionic/pwa-elements 3.3.0
Sorry, something went wrong.
No branches or pull requests
Running a fresh Angular 17 project, which uses Vite, and latest Capacitor.
Added
pwa-elements
as described in the Capacitor docs https://capacitorjs.com/docs/web/pwa-elements#angular:main.ts
:Running the code (
ng serve
) results in this warning: "The above dynamic import cannot be analyzed by Vite".Notably, everything does still seem to function, but the warning is a nuisance.
Hard to say if the issue is more with the stencil version that builds
pwa-elements
or what.Workarounds
Changing the vite config as described here #109 (comment) might potentially work, except Angular doesn't currently support configuring vite (https://angular.io/guide/esbuild#:~:text=currently%20cannot%20be%20directly%20configured).
Instead including
pwa-elements
via a cdn script tag inindex.html
does remove the warning, but doesn't work for offline scenarios.The text was updated successfully, but these errors were encountered: