Skip to content

Commit c5fad7e

Browse files
committed
feat: add pwa and meta tag configuration
1 parent 21e765f commit c5fad7e

File tree

7 files changed

+174
-27
lines changed

7 files changed

+174
-27
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
- [x] Auto-import Ionic components and composables throughout your app
1818
- [x] Ionic Router integration
1919
- [x] Pre-rendering auto-configuration
20+
- [x] Mobile meta tags
21+
- [x] PWA support with [`nuxt-pwa-module`](https://github.com/kevinmarrec/nuxt-pwa-module)
2022
- [ ] Capacitor implementation confirmed working
2123

2224
## Quick setup
@@ -39,6 +41,8 @@ export default defineNuxtConfig({
3941
ionic: {
4042
// default options - no configuration is required
4143
integrations: {
44+
meta: true,
45+
pwa: true,
4246
router: true,
4347
},
4448
css: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"dependencies": {
5353
"@ionic/vue": "^6.1.10",
5454
"@ionic/vue-router": "^6.1.10",
55+
"@kevinmarrec/nuxt-pwa": "^0.3.0",
5556
"@nuxt/kit": "^3.0.0-rc.4",
5657
"pathe": "^0.3.0",
5758
"unimport": "^0.2.9"

playground/nuxt.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ export default defineNuxtConfig({
44
modules: ['nuxt-ionic'],
55
ionic: {
66
// integrations: {
7+
// meta: true,
8+
// pwa: true,
79
// router: true,
810
// },
911
// css: {

playground/pages/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ion-list>
2929

3030
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
31-
<ion-fab-button @click="() => router.push('/new')">
31+
<ion-fab-button router-link="/new">
3232
<ion-icon :icon="add"></ion-icon>
3333
</ion-fab-button>
3434
</ion-fab>
@@ -38,7 +38,6 @@
3838

3939
<script setup>
4040
import { add } from 'ionicons/icons'
41-
const router = useIonRouter()
4241
useHead({
4342
title: 'Nuxt Ionic',
4443
})

playground/public/icon.png

1.77 KB
Loading

0 commit comments

Comments
 (0)