Skip to content

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

Open
userquin wants to merge 3 commits intomainfrom
userquin/feat-add-before-install-prompt
Open

feat(pwa): add before install prompt support#1
userquin wants to merge 3 commits intomainfrom
userquin/feat-add-before-install-prompt

Conversation

@userquin
Copy link
Copy Markdown
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

Comment thread src/composables/pwa.ts Outdated
Comment thread src/auto-imports.d.ts Outdated
@userquin
Copy link
Copy Markdown
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