{"id":40738,"date":"2022-04-06T10:00:13","date_gmt":"2022-04-06T14:00:13","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=40738"},"modified":"2022-04-05T20:20:04","modified_gmt":"2022-04-06T00:20:04","slug":"how-to-install-vitejs","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/","title":{"rendered":"How To Install ViteJS &#8211; The Next-Gen Front-End Tool"},"content":{"rendered":"<p>Back in April 2020, the developer community started to get hints of a new development server from Evan You (the creator of Vue.js, the popular JavaScript framework). Here\u2019s the first tweet he shared about the idea he was working on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-40739 size-full\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/ViteJs.png\" alt=\"how to install ViteJS\" width=\"512\" height=\"275\" \/><\/p>\n<p>The initial goal of ViteJS was to improve the development experience of Vue apps by providing a dev server faster than Vue CLI\u2019s. But this new build tool turned out to be a lot more than that. In February 2021, Vite 2 was launched as its first stable version, and Evan soon declared that this next-gent front-end build tool would be the foundation for future Vue-oriented tools.<\/p>\n<p>So, if you have come from the realm of JavaScript and worked with Webpack, Gulp, Grunt, and other traditional tools to create and bundle the entire app codebase, there is something new for you:<a href=\"https:\/\/vitejs.dev\/\" target=\"_blank\" rel=\"noopener\"> ViteJS<\/a>. This advanced <a href=\"https:\/\/simpleprogrammer.com\/front-end-tools-web-development\/\" target=\"_blank\" rel=\"noopener\">front-end tool<\/a> can refresh the dev server in the blink of an eye and dramatically reduce the development time.<\/p>\n<p>Interesting enough? Whether you\u2019re an experienced programmer or a newbie, this guide will help you understand how ViteJS works, how to install and set it up, create a SPA with it, and more.<\/p>\n<h2>How Does ViteJS Work?<\/h2>\n<p>Before you start with the installation guide, it\u2019s important to know how ViteJS works so that you can use this tool correctly without any confusion.<\/p>\n<p>Generally, Vue developers use Vue CLI (includes Webpack internally) to set up software projects during development and production. But this process comes with a couple of issues that the development team has to face quite often:<\/p>\n<ul>\n<li aria-level=\"1\">If you want to start developing, you have to bundle the whole app first. As a result, the cold server starts really slow, especially for large-scale projects.<\/li>\n<li aria-level=\"1\">Hot Module Replacement (HMR) might be very slow in large-scale projects as well.<\/li>\n<\/ul>\n<p>ViteJS mitigates these drawbacks by compiling code-on-demand. It compiles only the imported code on the present screen so that the performance of HMR gets decoupled from the total number of modules. Meaning, HMR updates become regularly fast irrespective of the size of your app, and the page reloads in a flash.<\/p>\n<h2>Getting Started with ViteJS Installation<\/h2>\n<p>As the very first step of working with ViteJS, you need to <a href=\"https:\/\/radixweb.com\/blog\/installing-npm-and-nodejs-on-windows-and-mac\" target=\"_blank\" rel=\"noopener\">install a copy of Node on your system<\/a>.<\/p>\n<p>I have chosen Node because it\u2019s one of the greatest tools to build real-time web applications. It offers <a href=\"https:\/\/www.amazon.com\/Cross-platform-Development-Programming-Books\/b?ie=UTF8&amp;node=3669\" target=\"_blank\" rel=\"noopener\">cross-platform applications<\/a> which run easily on any web. Moreover, as developers, we don\u2019t need anything extra to execute a Node application.<\/p>\n<p>Also, Node.js offers a set of built-in modules that can be used without further installation. We can install some custom modules from the NPM as the application requires. Hence, Node is a suitable and reliable option for ViteJS installation.<\/p>\n<p>Once you complete the process, execute the command <em><code>npm init @vitejs\/app<\/code><\/em>. You will then get to choose a project name and template. Here are the options you can select from at the time of writing:<\/p>\n<ul>\n<li aria-level=\"1\"><code>vanilla<\/code><\/li>\n<li aria-level=\"1\"><code>vue<\/code><\/li>\n<li aria-level=\"1\"><code>vue-ts<\/code><\/li>\n<li aria-level=\"1\"><code>react<\/code><\/li>\n<li aria-level=\"1\"><code>react-ts<\/code><\/li>\n<li aria-level=\"1\"><code>svelte<\/code><\/li>\n<li aria-level=\"1\"><code>svelte-ts<\/code><\/li>\n<li aria-level=\"1\"><code>preact<\/code><\/li>\n<li aria-level=\"1\"><code>preact-ts<\/code><\/li>\n<li aria-level=\"1\"><code>lit-element<\/code><\/li>\n<li aria-level=\"1\"><code>lit-element-ts<\/code><\/li>\n<\/ul>\n<p>Important files, such as lit-element-tsstyle.css, favicon.svg, main.js, index.html and many more are used for Git and npm. The package.json file only includes ViteJS as a dependency, along with some scripts to set up the development environment and initiate a build.\ufffc<\/p>\n<p>Here, some other files for Git are used. Git is a DevOps tool used for source code management. It is a free and open-source version control system used to handle every project size. Moreover, Git is used to track changes in the source code, enabling multiple developers to work together on non-linear development.<\/p>\n<p>Now it&#8217;s time to move to a directory path, open a terminal, and run <em><code>npx create-vite-app<\/code><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-40740 size-full\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/step-1.png\" alt=\"how to install ViteJS\" width=\"512\" height=\"209\" \/><\/p>\n<p>Once you have successfully called the command, move to your project directory with the cd command. You have to install the application dependencies by writing and running the command <code>npm install<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-40741\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/step-2.png\" alt=\"\" width=\"512\" height=\"76\" \/><\/p>\n<p>By executing the above command, you will open the app in VS code.<\/p>\n<p>You can then initiate the dev-server and execute the app with the <em><code>npm run dev<\/code><\/em> command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-40742 size-full\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/step-3.png\" alt=\"how to install ViteJS\" width=\"512\" height=\"170\" \/><\/p>\n<p>You will be able to access and view the app at <a href=\"http:\/\/localhost:3000\/\">http:\/\/localhost:3000\/<\/a>. If you need to edit any of the project files, the screen will instantly reflect all the changes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-40743\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/preview.png\" alt=\"\" width=\"402\" height=\"307\" \/><\/p>\n<p>Now, something like the above image will be seen on your display screen.<\/p>\n<p>By this time, your application should be running just fine.<\/p>\n<h2>How Hot Module Replacement (HMR) Works in ViteJS<\/h2>\n<p>In order to understand how ViteJS HMR works, let\u2019s use the component <code>Hello.vue<\/code> inside the component folder.<\/p>\n<p>Here&#8217;s what the executed code will look like:<\/p>\n<p><code>&lt;template&gt;<\/code><br \/>\n<code>&lt;h5&gt;{{ msg }}&lt;\/h5&gt;<\/code><br \/>\n<code>&lt;button @click=\"count++\"&gt;count is: {{ count }}&lt;\/button&gt;<\/code><br \/>\n<code>&lt;p&gt;<\/code><br \/>\n<code>Edit<\/code><br \/>\n<code>&lt;code&gt;components\/Hello.vue&lt;\/code&gt; to test hot module replacement.<\/code><br \/>\n<code>&lt;\/p&gt;<\/code><br \/>\n<code>&lt;\/template&gt;<\/code><br \/>\n<code>&lt;script&gt;<\/code><br \/>\n<code>export default {<\/code><br \/>\n<code>name: \"Hello\",<\/code><br \/>\n<code>props: {<\/code><br \/>\n<code>msg: String,<\/code><br \/>\n<code>},<\/code><br \/>\n<code>data() {<\/code><br \/>\n<code>return {<\/code><br \/>\n<code>count: 0,<\/code><br \/>\n<code>};<\/code><br \/>\n<code>},<\/code><br \/>\n<code>};<\/code><br \/>\n<code>&lt;\/script&gt;<\/code><\/p>\n<p>The reload time of ViteJS is a lot faster than typical VueJS apps; hence any changes you make to the code will be visible on the screen.<\/p>\n<p>In Vuejs, the <code>main.js<\/code> file runs under the hood. If you need to review the code on the browser through the menu, it calls the <code>main.js<\/code> file as a module.<\/p>\n<p>This is how the module looks:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-40744 size-full\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/module-preview.png\" alt=\"how to install ViteJS\" width=\"512\" height=\"228\" \/><\/p>\n<p>As you can see, instead of a bundle, ViteJS offers modules that make the whole app blazing fast.<\/p>\n<p>Now your Vue.js code is all ready to run smoothly!<\/p>\n<h2>Setting Up ViteJS Vue Router<\/h2>\n<p>You may wonder why you need to install and set up the Vue Router. The reason is that it&#8217;s the official router for working with Vue.js and creating Vue apps. Learning how to install and set up the Vue Router with ViteJS will surely be helpful for your ViteJS project.<\/p>\n<p>To start with the installation, you need to first install <code>vue.js<\/code> packages on your ViteJS app.<\/p>\n<p>Run the command <em><code>npm i --save vue-router@v4.0.0-alpha.11<\/code><\/em> and install the latest version of Vue Router.<\/p>\n<p>Next, you have to create a <code>router.js<\/code> file. Here&#8217;s how you should define the routes:<\/p>\n<p><em><code>import { createWebHistory, createRouter } from \"vue-router\"; import Home from \".\/components\/Hello.vue\"; const history = createWebHistory(); const routes = [{ path: \"\/\", component: Home }, ]; const router = createRouter({ history, routes }); export default router;<\/code><\/em><\/p>\n<p>After you successfully execute the code, it&#8217;s time to register the <code>register.js<\/code> file with the <code>main.js<\/code> file by calling the following command:<\/p>\n<p><em><code>import { createApp } from 'vue' import App from '.\/App.vue' import '.\/index.css' import router from \".\/router\"; createApp(App).use(router).mount('#app')<\/code><\/em><\/p>\n<p>The next step is to change the root component in the App.vue file to render all the components.<\/p>\n<p><code>&lt;template&gt;<\/code><br \/>\n<code>&lt;img alt=\"Vue logo\" src=\".\/assets\/logo.png\" \/&gt;<\/code><br \/>\n<code>&lt;Hello msg=\"Hello Vue 3.0 + Vite\" \/&gt;<\/code><br \/>\n<code>&lt;router-view \/&gt;<\/code><br \/>\n<code>&lt;\/template&gt;<\/code><br \/>\n<code>&lt;script&gt;<\/code><br \/>\n<code>import Hello from \".\/components\/Hello.vue\";<\/code><br \/>\n<code>export default {<\/code><br \/>\n<code>name: \"App\",<\/code><br \/>\n<code>components: {<\/code><br \/>\n<code>Hello,<\/code><br \/>\n<code>},<\/code><br \/>\n<code>};<\/code><br \/>\n<code>&lt;\/script&gt;<\/code><\/p>\n<p>Now you can choose any other custom route and register it seamlessly.<\/p>\n<h2>Setting Up a Single Page Application (SPA)<\/h2>\n<p>Wondering if ViteJS works with single-page applications or not?<\/p>\n<p>Let&#8217;s try to set one up with Vue.<\/p>\n<p>Run <em><code>npm init @vitejs\/app<\/code><\/em> and then choose the Vue template of your choice. You will get Vue, ViteJS, and a Vite plugin to compile Vue.<\/p>\n<p>Developing a SPA will require you to handle routes. So, you have to install the <a href=\"https:\/\/www.npmjs.com\/package\/vue-router\" target=\"_blank\" rel=\"noopener\">Vue Router<\/a>.<\/p>\n<p>However, ViteJS is not really helpful in this process. With a basic Vue setup, we have to be careful about what we plug into Vue. Although ViteJS is also useful to create multiple pages, as outlined in the <a href=\"https:\/\/morioh.com\/redirect?l=https%3A%2F%2Fvitejs.dev%2Fguide%2Fbuild.html%23multi-page-app\" target=\"_blank\" rel=\"noopener\">multi-page app<\/a> in the documents, you must tweak ViteJS\u2019s rollup configuration.<\/p>\n<p>But, on the brighter side, I found a fairly new plugin made by the community: <a href=\"https:\/\/morioh.com\/redirect?l=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fvite-plugin-vue-router\" target=\"_blank\" rel=\"noopener\">vite-plugin-vue-router.<\/a> Just like Nuxt, it creates a router based on your file paths.<\/p>\n<p>Given the expertise of the Vue-Vite community, we can positively expect that someone will soon create a Vue+Vue Router+Vuex template for ViteJS. But the chances of it being better than Nuxt are honestly less. The same applies to the scenario with Svelte and SvelteKit\/Supper, React, and NextJS. These are the top frameworks for <a href=\"https:\/\/www.amazon.com\/Web-Application-Development\/s?k=Web+Application+Development\" target=\"_blank\" rel=\"noopener\">web app development<\/a>, getting consistently optimized for complex apps and their own libraries.<\/p>\n<p>If there is no battle and time-tested web app framework for your chosen <a href=\"https:\/\/simpleprogrammer.com\/top-programming-languages-2021\/\" target=\"_blank\" rel=\"noopener\">programming language<\/a>, ViteJS is definitely worth a shot, leaving aside the fact that it would still need some configuration.<\/p>\n<h2>Back-End Integration with ViteJS<\/h2>\n<p>Some codebases don&#8217;t support Jamstack but use PHP or .NET as a back-end. ViteJS has efficiently come up with a <a href=\"https:\/\/morioh.com\/redirect?l=https%3A%2F%2Fvitejs.dev%2Fguide%2Fbackend-integration.html\" target=\"_blank\" rel=\"noopener\">back-end integration page<\/a> that will guide you to creating improved CSS and JavaScript bundles.<\/p>\n<p>After ViteJS follows the instruction, it generates a manifest file that includes all the information about created bundles. This file will help you build the <em>&lt;script&gt;<\/em> and <em>&lt;link&gt;<\/em> tags for the JavaScript and CSS bundles, respectively.<\/p>\n<p>Every import becomes a main.js file, except the dynamic imports that are bundled into separate bundles.<\/p>\n<h2>ViteJS, an Opportunity for Improvement<\/h2>\n<p>Being in the tech industry for over a decade, I have used multiple build tools for hundreds of projects. No matter whether it was Webpack, Gradle, or Gulp, large-scale projects always used to take a day or two to set up and ensure everything was working fine. Then came the tasks of optimizing build times, improving bundle optimization, and fixing bugs.<\/p>\n<p>In contrast,<a href=\"https:\/\/radixweb.com\/blog\/vite-js-latest-front-end-development-tool\" target=\"_blank\" rel=\"noopener\"> ViteJS is a lightning-fast frontend tool<\/a>. With a smooth front-end development experience, it has saved me a lot of time in the development and production environment that otherwise takes a toll on my efficiency and productivity. Undoubtedly, it\u2019s biting at the heels of all other build tools that reigned in the front-end development world over the last decade.<\/p>\n<p>While a lot of improvements and fixes are on the way, ViteJS still presents you with an opportunity to flex your coding skill and be a proficient <a href=\"https:\/\/simpleprogrammer.com\/best-resources-front-end-developers-2021\/\" target=\"_blank\" rel=\"noopener\">front-end developer<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in April 2020, the developer community started to get hints of a new development server from Evan You (the creator of Vue.js, the popular JavaScript framework). Here\u2019s the first tweet he shared about the idea he was working on. The initial goal of ViteJS was to improve the development experience of Vue apps by&#8230;<\/p>\n","protected":false},"author":1424,"featured_media":40750,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2185,415,162228491,31679,162229803,162229253,1981,2260,2358],"tags":[],"class_list":["post-40738","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices","category-guest-post","category-javascript","category-process-improvement","category-programming","category-technical","category-tools","category-web-development","category-web-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer<\/title>\n<meta name=\"description\" content=\"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-06T14:00:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"How To Install ViteJS &#8211; The Next-Gen Front-End Tool\",\"datePublished\":\"2022-04-06T14:00:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/\"},\"wordCount\":1492,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png\",\"articleSection\":[\"Best Practices\",\"Guest Post\",\"JavaScript\",\"Process Improvement\",\"Programming\",\"Technical\",\"Tools\",\"Web Development\",\"Web Services\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/\",\"name\":\"How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png\",\"datePublished\":\"2022-04-06T14:00:13+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/how-to-install-vitejs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install ViteJS &#8211; The Next-Gen Front-End Tool\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer","description":"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.","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:\/\/simpleprogrammer.com\/how-to-install-vitejs\/","og_locale":"en_US","og_type":"article","og_title":"How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer","og_description":"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.","og_url":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/","og_site_name":"Simple Programmer","article_published_time":"2022-04-06T14:00:13+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/"},"author":{"name":"","@id":""},"headline":"How To Install ViteJS &#8211; The Next-Gen Front-End Tool","datePublished":"2022-04-06T14:00:13+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/"},"wordCount":1492,"commentCount":0,"image":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png","articleSection":["Best Practices","Guest Post","JavaScript","Process Improvement","Programming","Technical","Tools","Web Development","Web Services"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/","url":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/","name":"How To Install ViteJS - The Next-Gen Front-End Tool - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png","datePublished":"2022-04-06T14:00:13+00:00","author":{"@id":""},"description":"A detailed guide on how to install ViteJs. If you plan to develop a lightning-fast web application, you should think about ViteJS first.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/04\/How-To-Install-ViteJS-The-Next-Gen-Front-End-Tool-1.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/how-to-install-vitejs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"How To Install ViteJS &#8211; The Next-Gen Front-End Tool"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"","url":"https:\/\/simpleprogrammer.com\/author\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/40738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/1424"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=40738"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/40738\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media\/40750"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=40738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=40738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=40738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}