Building Large Projects With Vue, Vite, and Lerna

Introduction

Today we’d like to present a blueprint for large Vue JS projects. It uses the new and exciting Vite build tool and Lerna monorepo manager. I’ve built large enterprise projects in a similar way, using Angular, Vue JS, webpack, and rollup. Vite, created by the Vue JS team, looks very promising so I wanted to give it a try.

There are plenty of Vite tutorials and demos, mostly the usual Hello World and Todo apps. But I needed something more useful. I wanted to see whether Vite can replace rollup and webpack in large real-life projects.

Limitations of Task-Based Build Tools

Many build tools use a classic task-based approach for organizing the CI/CD pipeline. Among these tools, there are both old (Ant, NAnt) and modern ones (Gradle, Cake, Nuke).

Let's start with the definition of the CI/CD pipeline.

Why Should Testers Start Learning Build Management Tools?

A few months back, I was going through some posts related to Test Automation in Quora. Suddenly a question posted by an anonymous user caught my attention – “What is Maven in Selenium?”

This was not the first time I came across this question or similar questions during my journey as an SDET. This is quite common since there is a lot of confusion regarding the differences between the build automation tools (“Maven” is one of them), and the test automation libraries, mostly among the testers who have just started learning/working on test automation and came across build tools for the first time.

Starting With Apache Maven

Apache Maven is a build or a total project management tool that scores over its predecessors such as ANT for Java builds with the following advantages:

  • Useful when multiple JAR files are required for builds
  • Resolving recursive dependencies during build time
  • Creating project structures that are standardized
  • Building, publishing, and deployment of applications
  • Supports lifecycle of an application along with plugins

I have created an alumni project that is a dynamic web archive with a Servlet that says “Hello, Alumni”.