{"id":5131,"date":"2023-04-24T16:25:32","date_gmt":"2023-04-24T20:25:32","guid":{"rendered":"https:\/\/ionic.io\/blog\/?p=5131"},"modified":"2023-04-24T16:25:33","modified_gmt":"2023-04-24T20:25:33","slug":"ionic-cli-v7","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/ionic-cli-v7","title":{"rendered":"Ionic CLI V7"},"content":{"rendered":"\n<p>Howdy folks! Along with the release of Ionic Framework V7, we\u2019re thrilled to announce the release of version 7 of the Ionic CLI. This release brings a lot of maintenance updates to the internals of the CLI as well as some new features that our community has been asking for.&nbsp;<\/p>\n\n\n\n<p>Without further ado, let\u2019s dive into it.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Getting the New New<\/h2>\n\n\n\n<p>First and foremost, to update to the latest CLI, you can simply install the latest from npm:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-shell\">npm install -g @ionic\/cli@latest \nionic -v <\/code><\/pre>\n\n\n\n<p>If that prints <code>7.0.0<\/code>, then you are good to go. If you run into any issues, please feel free to open an issue on the CLI repo.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parting Is Such Sweet Sorrow<\/h2>\n\n\n\n<p>With a new major version of the CLI, we took some time to review which features made sense to keep and which features were no longer needed. With V7, it\u2019s time we say goodbye to the following features:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ionic Lab (<a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/pull\/4960\">#4960<\/a>)<\/li>\n\n\n\n<li>Ionic Doctor command (<a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/pull\/4959\">#4959<\/a>)<\/li>\n\n\n\n<li>Ionic Docs command (<a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/pull\/4969\">#4969<\/a>)<\/li>\n\n\n\n<li>Support for Ionic V1 and V3 project (<a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/pull\/4978\">#4978<\/a>)<\/li>\n\n\n\n<li>Appflow Package commands and the Deploy Build command<\/li>\n<\/ul>\n\n\n\n<p>Developers leveraging the long deprecated Appflow commands should migrate to the Ionic Cloud CLI instead. If you use <code>deploy build<\/code> today, migrate to <code>ionic-cloud build web<\/code> and if you used the <code>--channel<\/code> option, also use <code>ionic-cloud deploy web<\/code>. If you use the <code>package<\/code> commands, then migrate to <code>ionic-cloud build<\/code> and <code>ionic-cloud deploy<\/code>.<\/p>\n\n\n\n<p>These features of the CLI have served us well, and we salute them as they sail off into the sunset.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The new stuff<\/h2>\n\n\n\n<p>Looking at the new features in CLI, we have lots of exciting updates to share. Starting with V7, we now support Vite projects for React and Vue! Vite support is something the community has long been asking for, so this is big. If you have an existing Vue or React project, fear not, as we still support Vue-CLI or React Scripts as well. To support this, we\u2019ve introduced a new project type in the ionic.config.json, vue-vite and react-vite. These new project types will tell the CLI that it should call Vite when you run ionic serve or ionic build.&nbsp;<\/p>\n\n\n\n<p>This also means that when you start a new project, you\u2019ll be given a Vite based project for React and Vue. As the community has gravitated towards Vite, we\u2019re going to recommend it for all Vue and React projects moving forward. If you have an older project, you can start with a fresh project as a starting point and move your components over piece by piece, or migrate your existing projects based on these setups.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">More Amazing Angular Updates<\/h2>\n\n\n\n<p>Though not technically tied to the Ionic CLI, the <code>@ionic\/angular-toolkit<\/code> provides essential features to our Angular community. To tie into this release, we\u2019ve also released version 8.0 of <code>@ionic\/angular-toolkit<\/code> that provides some needed updates for new versions of Angular.&nbsp;<\/p>\n\n\n\n<p>Starting off, we\u2019ve updated our minimum version support for <code>@ionic\/angular-toolkit<\/code> to Angular v15, so those who have been waiting for it can finally update!&nbsp;<\/p>\n\n\n\n<p>We\u2019ve also updated our schematics to support the newer standalone component format from Angular. Now we can generate pages that are standalone and can have them automatically added to the root routing config for your apps. By default, this flag is set to false in order to support apps that use NgModules. But you can enable it by running:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-shell\">ionic g page detail --standalone<\/code><\/pre>\n\n\n\n<p>While this is great for one off commands, you might want to enable this feature always. To do this, we can use the angular.json to set the default value of the flag:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-json\">{\n  ...\n  &quot;schematics&quot;: {\n    &quot;@ionic\/angular-toolkit:page&quot;: {\n      &quot;styleext&quot;: &quot;scss&quot;,\n      &quot;standalone&quot;: true\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p>By setting standalone to true here, any time we create a new page, it will be a standalone setup.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Thank you<\/h2>\n\n\n\n<p>We\u2019re excited to get this release of the CLI out there in coordination with the latest V7 release of Ionic Framework. As always, we want to extend heartfelt thanks to our community for their contributions and suggestions that ultimately help us put out the best possible product. Update your CLI today, and be sure to let us know if you have any questions or run into any issues by <a href=\"https:\/\/github.com\/ionic-team\/ionic-cli\/issues\/new\/choose\">filing a bug report<\/a> on GitHub.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re thrilled to announce the release of version 7 of the Ionic CLI, which is packed with maintenance updates and new features!\u00a0<\/p>\n","protected":false},"author":5,"featured_media":5184,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"","publish_post_category":"","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"","discourse_permalink":"","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,120],"tags":[],"class_list":["post-5131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-announcements"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Ionic CLI V7 - Ionic Blog<\/title>\n<meta name=\"description\" content=\"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/ionic-cli-v7\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ionic CLI V7\" \/>\n<meta property=\"og:description\" content=\"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/ionic-cli-v7\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-24T20:25:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-24T20:25:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image-1024x512.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mike Hartington\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mhartington\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mike Hartington\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7\"},\"author\":{\"name\":\"Mike Hartington\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\"},\"headline\":\"Ionic CLI V7\",\"datePublished\":\"2023-04-24T20:25:32+00:00\",\"dateModified\":\"2023-04-24T20:25:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7\"},\"wordCount\":676,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png\",\"articleSection\":[\"All\",\"Announcements\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/ionic-cli-v7#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7\",\"url\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7\",\"name\":\"Ionic CLI V7 - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png\",\"datePublished\":\"2023-04-24T20:25:32+00:00\",\"dateModified\":\"2023-04-24T20:25:33+00:00\",\"description\":\"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/ionic-cli-v7\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png\",\"width\":2240,\"height\":1120},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/ionic-cli-v7#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ionic CLI V7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b\",\"name\":\"Mike Hartington\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png\",\"caption\":\"Mike Hartington\"},\"description\":\"Director of Developer Relations\",\"sameAs\":[\"https:\/\/twitter.com\/mhartington\",\"https:\/\/x.com\/mhartington\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/mike\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ionic CLI V7 - Ionic Blog","description":"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/ionic-cli-v7","og_locale":"en_US","og_type":"article","og_title":"Ionic CLI V7","og_description":"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0","og_url":"https:\/\/ionic.io\/blog\/ionic-cli-v7","og_site_name":"Ionic Blog","article_published_time":"2023-04-24T20:25:32+00:00","article_modified_time":"2023-04-24T20:25:33+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image-1024x512.png","type":"image\/png"}],"author":"Mike Hartington","twitter_card":"summary_large_image","twitter_creator":"@mhartington","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Mike Hartington","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7"},"author":{"name":"Mike Hartington","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b"},"headline":"Ionic CLI V7","datePublished":"2023-04-24T20:25:32+00:00","dateModified":"2023-04-24T20:25:33+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7"},"wordCount":676,"commentCount":0,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png","articleSection":["All","Announcements"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/ionic-cli-v7#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7","url":"https:\/\/ionic.io\/blog\/ionic-cli-v7","name":"Ionic CLI V7 - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png","datePublished":"2023-04-24T20:25:32+00:00","dateModified":"2023-04-24T20:25:33+00:00","description":"We\u2019re thrilled to announce the release of Ionic CLI V7, which is packed with maintenance updates and new features!\u00a0","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/ionic-cli-v7"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png","width":2240,"height":1120},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/ionic-cli-v7#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Ionic CLI V7"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/c8c92b04d526adb925ea514c619a267b","name":"Mike Hartington","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/08\/mike-headshot-2-smaller-150x150.png","caption":"Mike Hartington"},"description":"Director of Developer Relations","sameAs":["https:\/\/twitter.com\/mhartington","https:\/\/x.com\/mhartington"],"url":"https:\/\/ionic.io\/blog\/author\/mike"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2023\/04\/ionic-CLI-7-feature-image.png","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/5131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=5131"}],"version-history":[{"count":5,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/5131\/revisions"}],"predecessor-version":[{"id":5187,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/5131\/revisions\/5187"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/5184"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=5131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=5131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=5131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}