A comparative analysis of Webpack and Vite as build tools for JavaScript
Saved in:
| Title: | A comparative analysis of Webpack and Vite as build tools for JavaScript |
|---|---|
| Authors: | Nguyen, Tuan Anh |
| Publication Year: | 2024 |
| Collection: | Theseus.fi (Open Repository of the Universities of Applied Sciences / Ammattikorkeakoulujen julkaisuarkisto) |
| Subject Terms: | fi=Tietojenkäsittely|sv=Informationsbehandling|en=Business Information Technology, vite, JavaScript, development (active), Degree Programme in Business Information Technology |
| Description: | There are three main categories of web development: front-end, back-end and full-stack. For front-end developments, build tools are used to boost performance and workflow. Vite and Webpack are two popular build tools for JavaScript projects. The aim of the study is to make a analysis of Vite and Webpack in different aspects: technical concepts, configuration files, performance in measurable metrics and support for JavaScript frameworks. The study includes literature reviewing, qualitative research to evaluate support for frameworks and factors affecting configuration complexity and in Vite and Webpack, quantitative research to measure build time, build size in Vite and Webpack. The research targets Vite and Webpack as JavaScript build tools. Backend build tools and unpopular JavaScript frameworks are ruled out. The theoretical framework includes knowledge about front-end development and JavaScript, JavaScript libraries and frameworks React, Vue, bundler and its features, build tool, technical details of Webpack and Vite. From the theoretical framework, Webpack and Vite shares similarities in minification, transpiling, source map, environment variable, hot module replacement, tree shaking. Webpack bundles the entire code and assets of the application in development and production build. Vite uses esbuild to pre-bundle dependencies and serve source code on demand via ECMAScript modules. In production build, Vite uses Rollup to bundles code. Case studies were gathered and made by the author to collect configuration files, build time and bundle size of projects in Vite and Webpack. Using esbuild in development and Rollup in production, Vite was faster than Webpack in development and production build time. The results of build size in production varied in case studies. The configuration files showed that Vite and Webpack supports JavaScript frameworks React and Vue by allowing usage of official as well as third-party plugins. Influencing factors of the configuration file in Vite are plugins, mode of build, port ... |
| Document Type: | bachelor thesis |
| Language: | English |
| Relation: | https://www.theseus.fi/handle/10024/877513 |
| Availability: | https://www.theseus.fi/handle/10024/877513 |
| Rights: | CC BY 4.0 |
| Accession Number: | edsbas.99FFBF7D |
| Database: | BASE |
| Abstract: | There are three main categories of web development: front-end, back-end and full-stack. For front-end developments, build tools are used to boost performance and workflow. Vite and Webpack are two popular build tools for JavaScript projects. The aim of the study is to make a analysis of Vite and Webpack in different aspects: technical concepts, configuration files, performance in measurable metrics and support for JavaScript frameworks. The study includes literature reviewing, qualitative research to evaluate support for frameworks and factors affecting configuration complexity and in Vite and Webpack, quantitative research to measure build time, build size in Vite and Webpack. The research targets Vite and Webpack as JavaScript build tools. Backend build tools and unpopular JavaScript frameworks are ruled out. The theoretical framework includes knowledge about front-end development and JavaScript, JavaScript libraries and frameworks React, Vue, bundler and its features, build tool, technical details of Webpack and Vite. From the theoretical framework, Webpack and Vite shares similarities in minification, transpiling, source map, environment variable, hot module replacement, tree shaking. Webpack bundles the entire code and assets of the application in development and production build. Vite uses esbuild to pre-bundle dependencies and serve source code on demand via ECMAScript modules. In production build, Vite uses Rollup to bundles code. Case studies were gathered and made by the author to collect configuration files, build time and bundle size of projects in Vite and Webpack. Using esbuild in development and Rollup in production, Vite was faster than Webpack in development and production build time. The results of build size in production varied in case studies. The configuration files showed that Vite and Webpack supports JavaScript frameworks React and Vue by allowing usage of official as well as third-party plugins. Influencing factors of the configuration file in Vite are plugins, mode of build, port ... |
|---|
Nájsť tento článok vo Web of Science