{"id":1707,"date":"2017-02-07T21:46:57","date_gmt":"2017-02-07T21:46:57","guid":{"rendered":"https:\/\/ionic.io\/blog\/?p=1707"},"modified":"2017-04-28T16:22:43","modified_gmt":"2017-04-28T16:22:43","slug":"help-us-test-ionic-native-3-x","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x","title":{"rendered":"Help us test Ionic Native 3.x"},"content":{"rendered":"<p>A major focus at Ionic right now is reducing the final bundle size of an Ionic app. One of the major file size offenders has been Ionic Native, which bundles a decent amount of plugin code into your app regardless of whether or not you&#8217;re using those plugins.<\/p>\n<p>Ionic Native 3.x fixes this by moving each plugin into its own npm module. Just need the <code>Camera<\/code> plugin? Install the <code>@ionic-native\/camera<\/code> package and then <code>import { Camera } from &#039;@ionic-native\/camera&#039;<\/code> instead of from the legacy <code>ionic-native<\/code> package.<\/p>\n<p><!--more--><\/p>\n<p>In our tests, this helped shave 15% of the final bundle size, which will help apps load more quickly.<\/p>\n<h3>Test it<\/h3>\n<p>To try out this new alpha version, remove <code>ionic-native<\/code> from your package.json dependencies, and instead add the plugins you need:<\/p>\n<pre><code class=\"json\">  &quot;dependencies&quot;: {\n    &quot;@angular\/common&quot;: &quot;2.2.1&quot;,\n    ...\n    &quot;@ionic-native\/camera&quot;: &quot;3.0.0-alpha.1&quot;,\n    &quot;@ionic-native\/statusbar&quot;: &quot;3.0.0-alpha.1&quot;,\n    &quot;@ionic-native\/splashscreen&quot;: &quot;3.0.0-alpha.1&quot;,\n    ...\n  },\n<\/code><\/pre>\n<p>Change your imports from <code>ionic-native<\/code> to match the new package format:<\/p>\n<pre><code class=\"typescript\">import { StatusBar } from &#039;@ionic-native\/statusbar&#039;;\nimport { Splashscreen } from &#039;@ionic-native\/splashscreen&#039;;\n<\/code><\/pre>\n<h3>Thoughts?<\/h3>\n<p>Please let us know how this works for you in the comments below or by filing an issue on the <a href=\"https:\/\/github.com\/driftyco\/ionic-native\">repo<\/a>.<\/p>\n<p>This is one of many filesize and boot time optimizations in the pipeline for Ionic, so stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A major focus at Ionic right now is reducing the final bundle size of an Ionic app. One of the major file size offenders has been Ionic Native, which bundles a decent amount of plugin code into your app regardless of whether or not you&#8217;re using those plugins. Ionic Native 3.x fixes this by moving [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","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],"tags":[],"class_list":["post-1707","post","type-post","status-publish","format-standard","hentry","category-all"],"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>Help us test Ionic Native 3.x - Ionic Blog<\/title>\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\/help-us-test-ionic-native-3-x\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Help us test Ionic Native 3.x\" \/>\n<meta property=\"og:description\" content=\"A major focus at Ionic right now is reducing the final bundle size of an Ionic app. One of the major file size offenders has been Ionic Native, which bundles a decent amount of plugin code into your app regardless of whether or not you&#8217;re using those plugins. Ionic Native 3.x fixes this by moving [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-07T21:46:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-28T16:22:43+00:00\" \/>\n<meta name=\"author\" content=\"Max Lynch\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@maxlynch\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Max Lynch\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\"},\"author\":{\"name\":\"Max Lynch\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e\"},\"headline\":\"Help us test Ionic Native 3.x\",\"datePublished\":\"2017-02-07T21:46:57+00:00\",\"dateModified\":\"2017-04-28T16:22:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\"},\"wordCount\":174,\"commentCount\":27,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"articleSection\":[\"All\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\",\"url\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\",\"name\":\"Help us test Ionic Native 3.x - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"datePublished\":\"2017-02-07T21:46:57+00:00\",\"dateModified\":\"2017-04-28T16:22:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help us test Ionic Native 3.x\"}]},{\"@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\/91f360cffbd804a464b0c4a87b5c5f1e\",\"name\":\"Max Lynch\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg\",\"caption\":\"Max Lynch\"},\"description\":\"CEO\",\"sameAs\":[\"http:\/\/twitter.com\/maxlynch\",\"https:\/\/x.com\/maxlynch\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/max\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Help us test Ionic Native 3.x - Ionic Blog","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\/help-us-test-ionic-native-3-x","og_locale":"en_US","og_type":"article","og_title":"Help us test Ionic Native 3.x","og_description":"A major focus at Ionic right now is reducing the final bundle size of an Ionic app. One of the major file size offenders has been Ionic Native, which bundles a decent amount of plugin code into your app regardless of whether or not you&#8217;re using those plugins. Ionic Native 3.x fixes this by moving [&hellip;]","og_url":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x","og_site_name":"Ionic Blog","article_published_time":"2017-02-07T21:46:57+00:00","article_modified_time":"2017-04-28T16:22:43+00:00","author":"Max Lynch","twitter_card":"summary_large_image","twitter_creator":"@maxlynch","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Max Lynch","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x"},"author":{"name":"Max Lynch","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/91f360cffbd804a464b0c4a87b5c5f1e"},"headline":"Help us test Ionic Native 3.x","datePublished":"2017-02-07T21:46:57+00:00","dateModified":"2017-04-28T16:22:43+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x"},"wordCount":174,"commentCount":27,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"articleSection":["All"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x","url":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x","name":"Help us test Ionic Native 3.x - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"datePublished":"2017-02-07T21:46:57+00:00","dateModified":"2017-04-28T16:22:43+00:00","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/help-us-test-ionic-native-3-x#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Help us test Ionic Native 3.x"}]},{"@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\/91f360cffbd804a464b0c4a87b5c5f1e","name":"Max Lynch","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/05\/max-avatar-150x150.jpg","caption":"Max Lynch"},"description":"CEO","sameAs":["http:\/\/twitter.com\/maxlynch","https:\/\/x.com\/maxlynch"],"url":"https:\/\/ionic.io\/blog\/author\/max"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/1707","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=1707"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/1707\/revisions"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=1707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=1707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=1707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}