{"id":22503,"date":"2023-08-09T09:23:00","date_gmt":"2023-08-09T07:23:00","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=22503"},"modified":"2023-08-07T11:23:48","modified_gmt":"2023-08-07T09:23:48","slug":"vitejs-guide","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/","title":{"rendered":"The Rise of ViteJS: Unraveling its Popularity"},"content":{"rendered":"\n<p>Contemporary web apps rely heavily on <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.codemotion.com\/magazine\/frontend\/javascript\/javascript-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">JavaScript<\/a> and its ecosystem. No longer simply responsible for ad-hoc snippets in otherwise static pages, JavaScript is now the driving force for dynamic web apps whose functionality closely models that of native apps. But this complexity comes at a cost. These apps may leverage hundreds or even thousands of JavaScript (also ECMAScript or TypeScript) modules.<\/p>\n\n\n\n<p>ViteJS is fundamentally a build tool and local development server. It is designed to streamline the front-end development of modern web apps by reloading code modules dynamically to <strong>avoid recompiling the entire application<\/strong>. In this article, we&#8217;ll offer an overview of ViteJS, covering its key features and benefits. We&#8217;ll also show you how to get started and expand functionality, and look at how Vite can optimise your apps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-key-features-of-vitejs\">Key features of ViteJS<\/h2>\n\n\n\n<p>Tools like <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/webpack.js.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">Webpack<\/a> and <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/rollupjs.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">Rollup<\/a> have helped to streamline front-end development and as native ES (ECMAScript) module support has become widespread in browsers, the situation has improved considerably. In fact, Vite is, in part, built on Rollup. <strong>But bottlenecks can be a problem for developers with complex code<\/strong>. Dev servers using bundler-based setups can take a significant time &#8211; even minutes &#8211; to reload when changes are made. Rather than bundling, however, Vite.js supports native ES modules (ESM) and serves them direct to the browser. That means it doesn&#8217;t need to reload the whole application when you make a change, so there&#8217;s no interruption to your development cycle.<\/p>\n\n\n\n<p>ViteJS achieves this speed through Hot Module Replacement (HMR). HMR means that modules can replace themselves independently of other page elements. While some bundlers support HMR, Vite&#8217;s approach is faster, using native ESM, so only a restricted portion of the dependency chain is invalidated. This means HMR times don&#8217;t expand as the application gains complexity.<\/p>\n\n\n\n<p>Vite has direct support for <strong>code-splitting and lazy loading to aid <a href=\"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/advanced-web-performance-optimization\/\" class=\"ek-link\">performance<\/a><\/strong>. With frameworks like Vue or React, you need to declare lazy import components manually for each route. However, Vite splits chunks automatically according to a vendor-based config, determining what needs to be loaded and when.<\/p>\n\n\n\n<p>Dependency pre-bundling takes place transparently when you run the <code>vite<\/code> command for the first time in your project. This improves both compatibility and performance. CommonJS and UMD components are converted to native ESM and the conversion of ESM dependencies into a single module enhances later page loads by requiring only a single HTTP request.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong><em>Recommended Video: What is Vite? By Jennifer Bland<\/em><\/strong><br>[jwp-video n=&#8221;1&#8243;]<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-getting-started-with-vitejs\">Getting Started with ViteJS<\/h2>\n\n\n\n<p>Vite is designed for speed and efficiency, so getting started is easy. It embraces the paradigm of <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/learn.microsoft.com\/en-us\/archive\/msdn-magazine\/2009\/february\/patterns-in-practice-convention-over-configuration\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">convention over configuration (CoC)<\/a>, also known as &#8216;opinionated&#8217; software. That means it works well straight out of the box. But it&#8217;s also very flexible and extensible, with wide support for languages and frameworks. Supported templates for JavaScript are:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Vanilla<\/li>\n\n\n\n<li>Vue<\/li>\n\n\n\n<li>React<\/li>\n\n\n\n<li>Preact<\/li>\n\n\n\n<li>Lit<\/li>\n\n\n\n<li>Svelte<\/li>\n\n\n\n<li>Solid<\/li>\n\n\n\n<li>Qwik<\/li>\n<\/ul>\n\n\n\n<p>There are also TypeScript variants of each of these.<\/p>\n\n\n\n<p>To run Vite, you&#8217;ll need <a href=\"https:\/\/nodejs.org\/en\" class=\"ek-link\">Node.js<\/a> v14.18 or above. You can then use command-line tools NPM, Yarn or PNPM to start a project &#8211; Vite will install all necessary components from here. For example, with NPM, just enter the following in your terminal:<br><code><br>$ npm create vite@latest<\/code><\/p>\n\n\n\n<p>Then follow the prompts to name your project, choose your framework and select a language variant. Once done, you can enter your project directory and type the following to fire up your server:<code><br>$ npm install<br>$ npm run dev<br><\/code><\/p>\n\n\n\n<p>This will generate a basic application scaffold &#8211; you can see the results in your browser, at <code>http:\/\/localhost:5173\/<\/code> by default. Note that, as standard, Vite uses a single <code>index.html<\/code> as its entry point and part of the module graph. From here, references to JavaScript source code and other assets are loaded as required. Resources are automatically rebased by Vite, so there&#8217;s no need to manage placeholders for publicly accessible directories. All of this means you can write code as you would for a static HTTP server, knowing that Vite will handle routes for you.<br><\/p>\n\n\n\n<p>Of course this scaffold is only a beginning &#8211; Vite.js is highly extensible and flexible and also features many presets for established frameworks and types of projects. You can choose a range of <a href=\"https:\/\/github.com\/vitejs\/awesome-vite#templates\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">community-developed templates on the Vite community github<\/a> to start your project .<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-exploring-the-vitejs-ecosystem\">Exploring the ViteJS ecosystem<\/h2>\n\n\n\n<p>While it&#8217;s simple to get started with Vite.js, there is also a significant ecosystem to explore for extending functionality.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-vite-plugins\">Vite plugins<\/h3>\n\n\n\n<p>Plugins allow you to extend Vite.js in diverse ways (though you&#8217;ll also find many common patterns are already supported by Vite&#8217;s core functionality). The plugin infrastructure is based on that of Rollup, with a few additional options. <strong>This means they come with a mature and stable ecosystem<\/strong>. Vite&#8217;s official plugins include additional functionality for Vue single file components, JSX and SWC, an alternative compiler tool to Babel. There&#8217;s also an extensive range of community-maintained plugins that extend Vite&#8217;s functionality in important ways, such as support for <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/vite-pwa-org.netlify.app\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">PWAs<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-framework-integrations\">Framework integrations<\/h3>\n\n\n\n<p>If you want to stick with an existing non-JavaScript back-end framework like Rails, <a href=\"https:\/\/www.codemotion.com\/magazine\/languages\/top-python-frameworks\/\" target=\"_blank\" aria-label=\"Flask, Django (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Flask, Django<\/a> or <a href=\"https:\/\/www.codemotion.com\/magazine\/languages\/laravel-best-practices\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Laravel<\/a>, Vite.js supports integrations here too. You can use your preferred web framework for standard MVC-style applications and use Vite for serving assets. You&#8217;ll find many of these integrations ready to use on the community portal, Awesome Vite. And if you wish to develop a custom integration of your own, that&#8217;s possible too, with a few <a href=\"https:\/\/vitejs.dev\/guide\/backend-integration.html\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">configuration directives<\/a>.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-community-and-developer-support\">Community and developer support<\/h3>\n\n\n\n<p>We&#8217;ve already mentioned Awesome Vite as a source for plugins, integrations and templates. You&#8217;ll find resources here for a huge range of extensions to Vite&#8217;s core functionality. Vite&#8217;s developer community is also lively and helpful. You&#8217;ll find plenty of support on <a href=\"https:\/\/github.com\/vitejs\/vite\/discussions\" class=\"ek-link\">Github Discussions<\/a> as well as the #help channel on <a href=\"https:\/\/discord.com\/invite\/aYVNktYeEB\">Vite Land Discord<\/a>.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-performance-and-optimization\">Performance and optimization<\/h2>\n\n\n\n<p>Aside from its ease of use, the major advantage of Vite.js is its performance. It achieves this by using native ESM for HMR. As we outlined above, this can save many seconds and sometimes even minutes in reload times that would otherwise have a <strong>severe impact on the development process<\/strong>. Traditional bundlers like Webpack, when tasked with compiling your code and assets, go through the whole dependency tree to provide the widest browser support. Vite, by contrast, only supports ESM-supporting browsers, which means it can take advantage of dynamic loading strategies.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faster-workflows\">Faster workflows<\/h3>\n\n\n\n<p>Vite&#8217;s ESM support means faster development workflows, preventing those tiresome waits during build processes. Vite.js does much of this out-of-the-box and includes <strong>many performance optimisations as standard<\/strong>. As well as core JavaScript code-splitting, Vite also automatically performs CSS code-splitting, generating asynchronous chunks that can be loaded only when needed.<br><\/p>\n\n\n\n<p>Vite also automates the optimisation of asynchronous chunk loading with a preload step that can determine dependencies before the initial load. This prevents the 2-stage loading of dependent chunks and extra network round trips.<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-page-loads-in-production\">Page loads in production<\/h3>\n\n\n\n<p>When it comes to deployment on production, Vite.js also pays dividends. The <code>vite build<\/code> command automatically produces a production-ready application bundle that only requires static hosting, meaning less server-side processing and simpler server setups.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>ViteJS is still young, but since its initial release in 2020, uptake has increased. It&#8217;s clear enough why. Vite is fast and lightweight, and allows developers to focus on their code without interruption or distraction from troublesome build processes. But Vite is not just easy to use. As web apps continue on their path towards greater standardisation and coherence with native applications, the demands placed on <a aria-label=\"JavaScript libraries and frameworks (opens in a new tab)\" href=\"https:\/\/www.codemotion.com\/magazine\/frontend\/javascript\/javascript-frameworks-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">JavaScript libraries and frameworks<\/a> are expanding hugely. To that extent, ViteJS is rapidly becoming an essential tool in managing complex JavaScript and ESM-driven applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contemporary web apps rely heavily on JavaScript and its ecosystem. No longer simply responsible for ad-hoc snippets in otherwise static pages, JavaScript is now the driving force for dynamic web apps whose functionality closely models that of native apps. But this complexity comes at a cost. These apps may leverage hundreds or even thousands of&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/\">Read more<\/a><\/p>\n","protected":false},"author":64,"featured_media":22506,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[31],"tags":[9907,9961,10823],"collections":[],"class_list":{"0":"post-22503","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-web-developer","8":"tag-frameworks","9":"tag-javascript","10":"tag-web-design","11":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>ViteJS: A Modern and Powerful Frontend Optimization Tool<\/title>\n<meta name=\"description\" content=\"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.\" \/>\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.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Rise of ViteJS: Unraveling its Popularity\" \/>\n<meta property=\"og:description\" content=\"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-09T07:23:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1977\" \/>\n\t<meta property=\"og:image:height\" content=\"1305\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Codemotion\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Codemotion\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/\"},\"author\":{\"name\":\"Codemotion\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/201bb98b02412383686cced7521b861c\"},\"headline\":\"The Rise of ViteJS: Unraveling its Popularity\",\"datePublished\":\"2023-08-09T07:23:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/\"},\"wordCount\":1260,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/ViteJS-framework-min-scaled-e1691399534636.jpg\",\"keywords\":[\"Frameworks\",\"JavaScript\",\"Web Design\"],\"articleSection\":[\"Web Developer\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/\",\"name\":\"ViteJS: A Modern and Powerful Frontend Optimization Tool\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/ViteJS-framework-min-scaled-e1691399534636.jpg\",\"datePublished\":\"2023-08-09T07:23:00+00:00\",\"description\":\"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/ViteJS-framework-min-scaled-e1691399534636.jpg\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/ViteJS-framework-min-scaled-e1691399534636.jpg\",\"width\":1977,\"height\":1305,\"caption\":\"ViteJS, javascript framework, what is it.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/vitejs-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Frontend\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Web Developer\",\"item\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/frontend\\\/web-developer\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"The Rise of ViteJS: Unraveling its Popularity\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#website\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Codemotion.Italy\\\/\",\"https:\\\/\\\/x.com\\\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/#\\\/schema\\\/person\\\/201bb98b02412383686cced7521b861c\",\"name\":\"Codemotion\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"contentUrl\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/wp-content\\\/uploads\\\/2019\\\/11\\\/cropped-codemotionlogo-150x150.png\",\"caption\":\"Codemotion\"},\"description\":\"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/CodemotionIT\"],\"url\":\"https:\\\/\\\/www.codemotion.com\\\/magazine\\\/author\\\/codemotion-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"ViteJS: A Modern and Powerful Frontend Optimization Tool","description":"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.","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.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/","og_locale":"en_US","og_type":"article","og_title":"The Rise of ViteJS: Unraveling its Popularity","og_description":"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.","og_url":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2023-08-09T07:23:00+00:00","og_image":[{"width":1977,"height":1305,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg","type":"image\/jpeg"}],"author":"Codemotion","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Codemotion","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/"},"author":{"name":"Codemotion","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c"},"headline":"The Rise of ViteJS: Unraveling its Popularity","datePublished":"2023-08-09T07:23:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/"},"wordCount":1260,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg","keywords":["Frameworks","JavaScript","Web Design"],"articleSection":["Web Developer"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/","url":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/","name":"ViteJS: A Modern and Powerful Frontend Optimization Tool","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg","datePublished":"2023-08-09T07:23:00+00:00","description":"Looking for a way to expand and optimise your frontend development? Then check out this article to understand why ViteJS is become so popular.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg","width":1977,"height":1305,"caption":"ViteJS, javascript framework, what is it."},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/vitejs-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Frontend","item":"https:\/\/www.codemotion.com\/magazine\/frontend\/"},{"@type":"ListItem","position":3,"name":"Web Developer","item":"https:\/\/www.codemotion.com\/magazine\/frontend\/web-developer\/"},{"@type":"ListItem","position":4,"name":"The Rise of ViteJS: Unraveling its Popularity"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/201bb98b02412383686cced7521b861c","name":"Codemotion","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/cropped-codemotionlogo-150x150.png","caption":"Codemotion"},"description":"Articles wirtten by the Codemotion staff. Tech news, inspiration, latest treends in software development and more.","sameAs":["https:\/\/x.com\/CodemotionIT"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-600x600.jpg","author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg",1977,1305,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-300x198.jpg",300,198,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-768x507.jpg",768,507,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-1024x676.jpg",1024,676,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-1536x1014.jpg",1536,1014,true],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-2048x1044.jpg",2048,1044,true],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636.jpg",100,66,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/08\/ViteJS-framework-min-scaled-e1691399534636-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Codemotion","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/codemotion-2\/"},"uagb_comment_info":0,"uagb_excerpt":"Contemporary web apps rely heavily on JavaScript and its ecosystem. No longer simply responsible for ad-hoc snippets in otherwise static pages, JavaScript is now the driving force for dynamic web apps whose functionality closely models that of native apps. But this complexity comes at a cost. These apps may leverage hundreds or even thousands of&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/22503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=22503"}],"version-history":[{"count":4,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/22503\/revisions"}],"predecessor-version":[{"id":22511,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/22503\/revisions\/22511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/22506"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=22503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=22503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=22503"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=22503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}