{"id":160171,"date":"2018-04-27T07:00:58","date_gmt":"2018-04-27T07:00:58","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=160171"},"modified":"2018-05-03T16:58:56","modified_gmt":"2018-05-03T16:58:56","slug":"using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","title":{"rendered":"Using the new webpack plugin for the ArcGIS API for JavaScript"},"author":7531,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[22941],"tags":[25891,24921,27491,43621],"industry":[],"product":[36831,36601],"class_list":["post-160171","blog","type-blog","status-publish","format-standard","hentry","category-mapping","tag-arcgis","tag-javascript","tag-jsapi4","tag-webpack","product-js-api-arcgis","product-developers"],"acf":{"short_description":"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!","flexible_content":[{"acf_fc_layout":"content","content":"<p>We are always working hard to improve the developer experience with the <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/index.html\">ArcGIS API for JavaScript<\/a>. We released the API via <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/using-npm\/index.html\">npm<\/a> and <a href=\"https:\/\/bower.io\/\">Bower<\/a> so that developers could create local builds of their applications with the <a href=\"https:\/\/dojotoolkit.org\/reference-guide\/1.10\/build\/buildSystem.html\">Dojo<\/a> build tools.<\/p>\n<p>Now, with the recent release of <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/release-notes\/index.html#custom-builds-with-npm-and-webpacks\">version 4.7<\/a>, we are happy to announce a new <a href=\"https:\/\/developers.arcgis.com\/javascript\/latest\/guide\/using-webpack\/index.html\"><strong>webpack plugin for the ArcGIS API for JavaScript<\/strong><\/a>!<\/p>\n<p>If you are unfamiliar, <a href=\"https:\/\/webpack.js.org\/\">webpack<\/a> is a modern web development tool for building applications. It has numerous advantages, including: module bundling, dependency graphs, and built-in code optimizations. It also has many available plugins, so chances are, if you need it, there\u2019s a plugin for it! It\u2019s not uncommon for JavaScript libraries or frameworks to provide their own webpack plugins, so that\u2019s what we did.<\/p>\n<h2>Getting Started<\/h2>\n<p>You can start using the <a href=\"https:\/\/github.com\/esri\/arcgis-webpack-plugin\"><strong>@arcgis\/webpack-plugin<\/strong><\/a> in your project pretty easily.<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">npm install --save-dev @arcgis\/webpack-plugin<\/code><\/pre>\n<p>Once the plugin is installed, you can start writing your application like you normally would. For example, maybe you want to use <a href=\"https:\/\/reactjs.org\/\">React<\/a> to build components for your application.<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> <span style=\"color: #d14;\">\".\/config\"<\/span>;\r\n\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> FeatureLayer = require(<span style=\"color: #d14;\">\"esri\/layers\/FeatureLayer\"<\/span>);\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> SceneView = require(<span style=\"color: #d14;\">\"esri\/views\/SceneView\"<\/span>);\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> WebMap = require(<span style=\"color: #d14;\">\"esri\/WebMap\"<\/span>);\r\n\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> * <span style=\"color: #333; font-weight: bold;\">as<\/span> React <span style=\"color: #333; font-weight: bold;\">from<\/span> <span style=\"color: #d14;\">\"react\"<\/span>;\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> * <span style=\"color: #333; font-weight: bold;\">as<\/span> ReactDOM <span style=\"color: #333; font-weight: bold;\">from<\/span> <span style=\"color: #d14;\">\"react-dom\"<\/span>;\r\n\r\n<span style=\"color: #333; font-weight: bold;\">import<\/span> <span style=\"color: #d14;\">\".\/css\/main.scss\"<\/span>;\r\n\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> onComponentLoad = (view: SceneView) =&gt; {\r\n  featureLayer.when(() =&gt; {\r\n    view.goTo({ target: featureLayer.fullExtent });\r\n  });\r\n};\r\n\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> featureLayer = <span style=\"color: #333; font-weight: bold;\">new<\/span> FeatureLayer({\r\n  id: <span style=\"color: #d14;\">\"states\"<\/span>,\r\n  portalItem: {\r\n    id: <span style=\"color: #d14;\">\"b234a118ab6b4c91908a1cf677941702\"<\/span>\r\n  },\r\n  outFields: [<span style=\"color: #d14;\">\"NAME\"<\/span>, <span style=\"color: #d14;\">\"STATE_NAME\"<\/span>, <span style=\"color: #d14;\">\"VACANT\"<\/span>, <span style=\"color: #d14;\">\"HSE_UNITS\"<\/span>],\r\n  title: <span style=\"color: #d14;\">\"U.S. counties\"<\/span>\r\n});\r\n\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> webmap = <span style=\"color: #333; font-weight: bold;\">new<\/span> WebMap({\r\n  portalItem: {\r\n    id: <span style=\"color: #d14;\">\"3ff64504498c4e9581a7a754412b6a9e\"<\/span>\r\n  },\r\n  layers: [featureLayer]\r\n});\r\n\r\n<span style=\"color: #998; font-style: italic;\">\/**\r\n * React portion of application\r\n *\/<\/span>\r\n\r\ninterface ComponentProps {\r\n  webmap: WebMap;\r\n  onload: (view: SceneView) =&gt; <span style=\"color: #333; font-weight: bold;\">void<\/span>;\r\n}\r\n\r\n<span style=\"color: #333; font-weight: bold;\">class<\/span> <span style=\"color: #458; font-weight: bold;\">WebMapComponent<\/span> <span style=\"color: #333; font-weight: bold;\">extends<\/span> <span style=\"color: #458; font-weight: bold;\">React<\/span>.<span style=\"color: #458; font-weight: bold;\">Component<\/span>&lt;<span style=\"color: #458; font-weight: bold;\">ComponentProps<\/span>, {}&gt; {\r\n  mapDiv: any;\r\n\r\n  componentDidMount() {\r\n    <span style=\"color: #333; font-weight: bold;\">const<\/span> view = <span style=\"color: #333; font-weight: bold;\">new<\/span> SceneView({\r\n      map: <span style=\"color: #333; font-weight: bold;\">this<\/span>.props.webmap,\r\n      container: <span style=\"color: #333; font-weight: bold;\">this<\/span>.mapDiv\r\n    });\r\n    <span style=\"color: #333; font-weight: bold;\">this<\/span>.props.onload(view);\r\n  }\r\n\r\n  render() {\r\n    <span style=\"color: #333; font-weight: bold;\">return<\/span> (\r\n      <span style=\"color: #000080; font-weight: normal;\">&lt;<span style=\"color: #000080; font-weight: normal;\">div<\/span> <span style=\"color: #008080;\">className<\/span>=<span style=\"color: #d14;\">\"webmap\"<\/span>\r\n        <span style=\"color: #008080;\">ref<\/span>=<span style=\"color: #d14;\">{<\/span>\r\n          <span style=\"color: #008080;\">element<\/span> =&gt;<\/span> this.mapDiv = element\r\n        }&gt;\r\n      <span style=\"color: #000080; font-weight: normal;\">&lt;\/<span style=\"color: #000080; font-weight: normal;\">div<\/span>&gt;<\/span>\r\n    );\r\n  }\r\n}\r\n\r\nReactDOM.render(\r\n  <span style=\"color: #000080; font-weight: normal;\">&lt;<span style=\"color: #000080; font-weight: normal;\">div<\/span> <span style=\"color: #008080;\">className<\/span>=<span style=\"color: #d14;\">\"main\"<\/span>&gt;<\/span>\r\n    <span style=\"color: #000080; font-weight: normal;\">&lt;<span style=\"color: #000080; font-weight: normal;\">WebMapComponent<\/span>\r\n      <span style=\"color: #008080;\">webmap<\/span>=<span style=\"color: #d14;\">{webmap}<\/span>\r\n      <span style=\"color: #008080;\">onload<\/span>=<span style=\"color: #d14;\">{onComponentLoad}<\/span> \/&gt;<\/span>\r\n  <span style=\"color: #000080; font-weight: normal;\">&lt;\/<span style=\"color: #000080; font-weight: normal;\">div<\/span>&gt;<\/span>,\r\n  document.getElementById(\"app\")\r\n);\r\n\r\n<\/code><\/pre>\n<p>That\u2019s a very simple application built with React and the ArcGIS API for JavaScript.<\/p>\n<p>Now you can update your webpack configuration to use the <a href=\"https:\/\/github.com\/esri\/arcgis-webpack-plugin\"><strong>@arcgis\/webpack-plugin<\/strong><\/a>.<\/p>\n<pre><code style=\"display: block; overflow-x: auto; padding: 0.5em; color: #333; background: #f8f8f8; -webkit-text-size-adjust: none;\">\r\n<span style=\"color: #998; font-style: italic;\">\/\/ webpack.config.js<\/span>\r\n<span style=\"color: #333; font-weight: bold;\">const<\/span> ArcGISPlugin = <span style=\"color: #0086b3;\">require<\/span>(<span style=\"color: #d14;\">\"@arcgis\/webpack-plugin\"<\/span>);\r\n\r\n<span style=\"color: #998; font-style: italic;\">\/\/ add it to config<\/span>\r\n<span style=\"color: #0086b3;\">module<\/span>.exports = {\r\n  ...\r\n  plugins: [<span style=\"color: #333; font-weight: bold;\">new<\/span> ArcGISPlugin()]\r\n  ...\r\n}\r\n<\/code><\/pre>\n"},{"acf_fc_layout":"image","image":{"ID":161801,"id":161801,"title":"webpack-app","filename":"webpack-app.gif","filesize":1650007,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\/webpack-app","alt":"@arcgis\/webpack-plugin app","author":"7531","description":"","caption":"","name":"webpack-app","status":"inherit","uploaded_to":160171,"date":"2018-04-24 19:25:40","modified":"2018-04-24 19:26:21","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1296,"height":810,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","thumbnail-width":213,"thumbnail-height":133,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","medium-width":418,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","medium_large-width":768,"medium_large-height":480,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","large-width":1296,"large-height":810,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","1536x1536-width":1296,"1536x1536-height":810,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","2048x2048-width":1296,"2048x2048-height":810,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","card_image-width":744,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/webpack-app.gif","wide_image-width":1296,"wide_image-height":810}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>You can find the <a href=\"https:\/\/github.com\/Esri\/jsapi-resources\/tree\/master\/4.x\/webpack\">full source code for this application<\/a> on GitHub. All the code splitting and bundle generation is managed by webpack. It will generate one bundle per layer, because <a href=\"https:\/\/developers.arcgis.com\/documentation\/core-concepts\/web-maps\/\">web maps<\/a> can contain any layer type, and they are loaded automatically. Your main bundle will only load the bundled files required for your application. Other bundles will be loaded as needed at runtime.<\/p>\n<p><em>This frees you up to focus on writing your application instead of the details of building your application!<\/em><\/p>\n<p>We look forward to hearing about your experience with the <a href=\"https:\/\/github.com\/esri\/arcgis-webpack-plugin\"><strong>@arcgis\/webpack-plugin<\/strong><\/a>, and if you have any problems, please feel free to <a href=\"https:\/\/github.com\/Esri\/arcgis-webpack-plugin\/issues\">submit an issue<\/a> in the repo!<\/p>\n<p>&nbsp;<\/p>\n"}],"authors":[{"ID":7531,"user_firstname":"Rene","user_lastname":"Rubalcava","nickname":"r.rubalcava","user_nicename":"r-rubalcava","display_name":"Rene Rubalcava","user_email":"RRubalcava@esri.com","user_url":"http:\/\/odoe.net\/","user_registered":"2018-03-21 18:21:22","user_description":"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks.\r\n\r\nI blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava\r\n\r\nI write code, sometimes it even works.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"},{"ID":7451,"user_firstname":"Noah","user_lastname":"Sager","nickname":"Noah Sager","user_nicename":"noah-sager","display_name":"Noah Sager","user_email":"NSager@esri.com","user_url":"https:\/\/www.noahsager.net\/","user_registered":"2018-03-21 18:21:19","user_description":"Passionate about JavaScript, maps, and writing (not necessarily in that order). Big fan of squirrels. Journeyman mapper of Utility Lines and Public Restrooms. Product Engineer on the ArcGIS API for JavaScript team. In Noah\u2019s spare time, he also enjoys parenting.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/6807cdccf3ddd5b30b84cdf9368ce6736c3d0ff9bd0a09c1f5efc03253069b64?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/6807cdccf3ddd5b30b84cdf9368ce6736c3d0ff9bd0a09c1f5efc03253069b64?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"},{"ID":7791,"user_firstname":"Yann","user_lastname":"Cabon","nickname":"YCabon","user_nicename":"ycabon","display_name":"Yann Cabon","user_email":"YCabon@esri.com","user_url":"","user_registered":"2018-04-12 18:23:30","user_description":"Lead Developer on the ArcGIS API for JavaScript 4.x","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/3b3c9e03675f6e6a0e122dd21d383e6097c894a955c446de912e7b9c3b11221f?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/3b3c9e03675f6e6a0e122dd21d383e6097c894a955c446de912e7b9c3b11221f?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"related_articles":[{"ID":140441,"post_author":"7451","post_date":"2018-04-19 17:30:15","post_date_gmt":"2018-04-19 17:30:15","post_content":"","post_title":"ArcGIS API for JavaScript versions 4.7 and 3.24 released","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"arcgis-api-for-javascript-versions-4-7-and-3-24-released","to_ping":"","pinged":"","post_modified":"2018-05-07 16:18:46","post_modified_gmt":"2018-05-07 16:18:46","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=140441","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":156611,"post_author":"6561","post_date":"2018-04-24 07:00:01","post_date_gmt":"2018-04-24 07:00:01","post_content":"","post_title":"Build 3D web apps with your 2D data","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"build-3d-web-apps-with-your-2d-data","to_ping":"","pinged":"","post_modified":"2018-04-23 23:12:30","post_modified_gmt":"2018-04-23 23:12:30","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=156611","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":158121,"post_author":"5981","post_date":"2018-04-23 08:00:05","post_date_gmt":"2018-04-23 08:00:05","post_content":"","post_title":"Introducing client-side projection engine","post_excerpt":"","post_status":"publish","comment_status":"closed","ping_status":"closed","post_password":"","post_name":"introducing-the-client-side-projection-engine","to_ping":"","pinged":"","post_modified":"2018-04-23 15:22:04","post_modified_gmt":"2018-04-23 15:22:04","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=158121","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/arcgis-webpack.png","wide_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using the new webpack plugin for the ArcGIS API for JavaScript<\/title>\n<meta name=\"description\" content=\"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the new webpack plugin for the ArcGIS API for JavaScript\" \/>\n<meta property=\"og:description\" content=\"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-03T16:58:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\"},\"author\":{\"name\":\"Rene Rubalcava\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd\"},\"headline\":\"Using the new webpack plugin for the ArcGIS API for JavaScript\",\"datePublished\":\"2018-04-27T07:00:58+00:00\",\"dateModified\":\"2018-05-03T16:58:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\"},\"wordCount\":11,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS\",\"JavaScript\",\"jsapi4\",\"webpack\"],\"articleSection\":[\"Mapping\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\",\"name\":\"Using the new webpack plugin for the ArcGIS API for JavaScript\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2018-04-27T07:00:58+00:00\",\"dateModified\":\"2018-05-03T16:58:56+00:00\",\"description\":\"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using the new webpack plugin for the ArcGIS API for JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd\",\"name\":\"Rene Rubalcava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png\",\"caption\":\"Rene Rubalcava\"},\"description\":\"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks. I blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava I write code, sometimes it even works.\",\"sameAs\":[\"http:\/\/odoe.net\/\",\"https:\/\/www.facebook.com\/odoenetgeo\/\",\"https:\/\/www.linkedin.com\/in\/renerubalcava\",\"https:\/\/x.com\/odoenet\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/r-rubalcava\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Using the new webpack plugin for the ArcGIS API for JavaScript","description":"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!","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:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","og_locale":"en_US","og_type":"article","og_title":"Using the new webpack plugin for the ArcGIS API for JavaScript","og_description":"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-05-03T16:58:56+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript"},"author":{"name":"Rene Rubalcava","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd"},"headline":"Using the new webpack plugin for the ArcGIS API for JavaScript","datePublished":"2018-04-27T07:00:58+00:00","dateModified":"2018-05-03T16:58:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript"},"wordCount":11,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS","JavaScript","jsapi4","webpack"],"articleSection":["Mapping"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","name":"Using the new webpack plugin for the ArcGIS API for JavaScript","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2018-04-27T07:00:58+00:00","dateModified":"2018-05-03T16:58:56+00:00","description":"Learn how to use the new @arcgis\/webpack-plugin to help you build your own bundled apps with webpack and the ArcGIS API for JavaScript today!","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Using the new webpack plugin for the ArcGIS API for JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/5e8200af39ef9d178ccabb08822d96cd","name":"Rene Rubalcava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2021\/03\/ReneRubalcava-213x200.png","caption":"Rene Rubalcava"},"description":"SoftWhere Developer, blogger, author, geodev, and connoisseur of programming languages and JavaScript frameworks. I blog at https:\/\/odoe.net and post videos at https:\/\/www.youtube.com\/c\/renerubalcava I write code, sometimes it even works.","sameAs":["http:\/\/odoe.net\/","https:\/\/www.facebook.com\/odoenetgeo\/","https:\/\/www.linkedin.com\/in\/renerubalcava","https:\/\/x.com\/odoenet"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/r-rubalcava"}]}},"text_date":"April 27, 2018","author_name":"Multiple Authors","author_page":"https:\/\/www.esri.com\/arcgis-blog\/products\/js-api-arcgis\/mapping\/using-the-new-webpack-plugin-for-the-arcgis-api-for-javascript","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcGIS Maps SDK for JavaScript","tag_data":[{"term_id":25891,"name":"ArcGIS","slug":"arcgis","term_group":0,"term_taxonomy_id":25891,"taxonomy":"post_tag","description":"","parent":0,"count":209,"filter":"raw"},{"term_id":24921,"name":"JavaScript","slug":"javascript","term_group":0,"term_taxonomy_id":24921,"taxonomy":"post_tag","description":"","parent":0,"count":151,"filter":"raw"},{"term_id":27491,"name":"jsapi4","slug":"jsapi4","term_group":0,"term_taxonomy_id":27491,"taxonomy":"post_tag","description":"","parent":0,"count":111,"filter":"raw"},{"term_id":43621,"name":"webpack","slug":"webpack","term_group":0,"term_taxonomy_id":43621,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"}],"category_data":[{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2696,"filter":"raw"}],"product_data":[{"term_id":36831,"name":"ArcGIS Maps SDK for JavaScript","slug":"js-api-arcgis","term_group":0,"term_taxonomy_id":36831,"taxonomy":"product","description":"","parent":36601,"count":363,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":765,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=js-api-arcgis","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/160171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/7531"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=160171"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/160171\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=160171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=160171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=160171"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=160171"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=160171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}