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

feat(pwa): add before install prompt support #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

userquin
Copy link
Owner

@userquin userquin commented Oct 26, 2024

This PR moves the pwa module to a composable adding a new PWABadge.vue component, registered via ClientOnly wrapper in both layouts in the App.vue component.

Looks like auto-import augmenting @vue/runtime-core instead vue module: added the hint (disabled: check the header and the footer) to fix this in shims.d.ts (check nuxt/nuxt#28542 (comment), nuxt/nuxt#28542 (comment) and https://vuejs.org/guide/typescript/options-api#augmenting-global-properties)

image

src/composables/pwa.ts Outdated Show resolved Hide resolved
src/auto-imports.d.ts Outdated Show resolved Hide resolved
@userquin
Copy link
Owner Author

userquin commented Oct 26, 2024

This PR enables the vue module augmentation fix, you can remove it from shims.d.ts: if you need to use $route or similar in your templates, TypeScript/ESLint will complain in VSCode/IntelliJ/WebStorm since auto import augmenting @vue/runtime-core and this is wrong (will break any vue module augmentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant