{"id":19656666,"url":"https://github.com/daggerok/ionic-nuxt-app","last_synced_at":"2025-04-28T18:32:53.917Z","repository":{"id":50854005,"uuid":"226746438","full_name":"daggerok/ionic-nuxt-app","owner":"daggerok","description":"Ionic + Nuxt.js setup https://daggerok.github.io/ionic-nuxt-app/","archived":false,"fork":false,"pushed_at":"2024-08-05T19:56:00.000Z","size":2553,"stargazers_count":45,"open_issues_count":6,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T10:23:07.200Z","etag":null,"topics":["base-href","github","ionic","nuxt","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-08T23:20:33.000Z","updated_at":"2024-12-10T18:17:33.000Z","dependencies_parsed_at":"2022-09-03T03:23:49.774Z","dependency_job_id":null,"html_url":"https://github.com/daggerok/ionic-nuxt-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fionic-nuxt-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fionic-nuxt-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fionic-nuxt-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fionic-nuxt-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/ionic-nuxt-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251366138,"owners_count":21578080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base-href","github","ionic","nuxt","vue"],"created_at":"2024-11-11T15:28:33.517Z","updated_at":"2025-04-28T18:32:53.613Z","avatar_url":"https://github.com/daggerok.png","language":"JavaScript","readme":"# ionic-nuxt-app [![Build Status](https://travis-ci.org/daggerok/ionic-nuxt-app.svg?branch=master)](https://travis-ci.org/daggerok/ionic-nuxt-app) [![CI](https://github.com/daggerok/ionic-nuxt-app/workflows/CI/badge.svg)](https://github.com/daggerok/ionic-nuxt-app/actions?query=workflow%3ACI)\nIonic + Nuxt.js setup\n\n## setup\n\ncreate regular nuxt app:\n\n```bash\nnpm i -g create-nuxt-app\ncreate-nuxt-app ionic-nuxt-app\ncd ionic-nuxt-app/\nnpm i -E @ionic/core @ionic/vue\n\n# IMPORTANT:\nnpm i -ED jest@24.9.0\n```\n\nadd `plugins/ionic.js` file:\n\n```js\nimport Vue from 'vue';\n// import Ionic from '@ionic/vue';\nimport { defineCustomElements as Ionic } from \"@ionic/core/loader\"; // add a direct link to @ionic/core\n\nVue.use(Ionic);\nVue.config.ignoredElements = [\n  /^ion-/,\n];\n```\n\nedit `layoutes/default.vue` file:\n\n```vue\n\u003ctemplate\u003e\n  \u003cion-app\u003e\n    \u003cnuxt /\u003e\n  \u003c/ion-app\u003e\n\u003c/template\u003e\n```\n\nedit `pages/index.vue` file:\n\n```vue\n\u003ctemplate\u003e\n  \u003c!-- Add some ionic markup... --\u003e\n  \u003cion-page\u003e\n    \u003cion-header\u003e\n      \u003cion-toolbar class=\"toolbar-md-primary\"\u003e\n        \u003cion-title\u003eIonic Nuxt App\u003c/ion-title\u003e\n      \u003c/ion-toolbar\u003e\n    \u003c/ion-header\u003e\n    \u003cLogo/\u003e\n    \u003cion-content class=\"content\"\u003e\n      \u003cion-card\u003e\n        \u003cion-card-subtitle\u003eOlolo\u003c/ion-card-subtitle\u003e\n        \u003cion-card-title\u003eTrololo\u003c/ion-card-title\u003e\n        \u003cion-card-content\u003e\n          \u003ch1\u003eHololo!\u003c/h1\u003e\n        \u003c/ion-card-content\u003e\n      \u003c/ion-card\u003e\n    \u003c/ion-content\u003e\n  \u003c/ion-page\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import Logo from '~/components/Logo.vue';\n\n  export default {\n    components: {\n      Logo,\n    },\n  };\n\u003c/script\u003e\n```\n\nfinally, edit `nuxt.config.js` file:\n\n```js\n// let's pick \u003cbase href=\"/ionic-nuxt-app/\" /\u003e when GitHub pages:\nconst baseHref = process.env.BASE_HREF || '/';\nexport default {\n  head: {\n    link: [\n      // favicon for GitBub pages base href\n      { rel: 'icon', type: 'image/x-icon', href: baseHref + 'favicon.ico' }\n    ]\n  },\n  css: [\n    // add required css:\n    '../node_modules/@ionic/core/css/core.css',\n    '../node_modules/@ionic/core/css/normalize.css',\n    '../node_modules/@ionic/core/css/structure.css',\n    '../node_modules/@ionic/core/css/typography.css',\n    '../node_modules/@ionic/core/css/ionic.bundle.css',\n  ],\n  plugins: [\n    // add created plugin:\n    { src: '~/plugins/ionic.js', mode: 'client' },\n  ],\n  generate: {\n    routes: [\n      '/',\n    ],\n  },\n  router: {\n    // router with correct public path\n    base: baseHref,\n    mode: 'history',\n  },\n  // skipped others...\n}\n```\n\n## build, test and run\n\n```bash\nrm -rf node_modules package-lock.json dist ; npm i ; npm audit fix ; npm t\nnpm start\nhttp :3000\n```\n\n## resources\n\n* https://forum.ionicframework.com/t/is-it-possible-to-use-ionic-with-nuxt/163202/3\n* https://ionicframework.com/docs/installation/cdn\n* [Nuxt.js docs](https://nuxtjs.org)\n* https://github.com/daggerok/webflux-kotlin-ionic-nuxt-mono-app\n* https://github.com/daggerok/typescript-ionic-nuxt-app\n* https://github.com/daggerok/spring-boot-nuxt-spa\n* https://github.com/daggerok/vue-ionic-example\n* https://github.com/daggerok/nuxt-examples\n* https://github.com/daggerok/vue-examples\n* https://alligator.io/vuejs/vue-ionic/\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fionic-nuxt-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fionic-nuxt-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fionic-nuxt-app/lists"}